New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

govuk_frontend_toolkit

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

govuk_frontend_toolkit - npm Package Compare versions

Comparing version 0.44.0 to 0.45.0

govuk_frontend_toolkit/javascripts/govuk/stick-at-top-when-scrolling.js

2

govuk_frontend_toolkit/javascripts/govuk/primary-links.js

@@ -35,5 +35,7 @@ (function() {

this.$extraLinks.addClass('visuallyhidden');
$(window).trigger('govuk.pageSizeChanged')
},
showExtraLinks: function(){
this.$extraLinks.removeClass('visuallyhidden');
$(window).trigger('govuk.pageSizeChanged')
}

@@ -40,0 +42,0 @@ };

@@ -701,5 +701,33 @@ # GOV.UK Frontend Toolkit

## Stick at top when scrolling
`GOVUK.stickAtTopWhenScrolling` tries to add a class to an element when the top
of that element would be scrolled out of the viewport.
The following would cause the element to stay when you scroll:
```html
<div class="js-stick-at-top-when-scrolling">something</div>
```
```css
.content-fixed {
position: fixed;
top: 0;
}
.shim {
display: block;
}
```
```javascript
GOVUK.stickAtTopWhenScrolling.init();
```
If you also include the `stopScrollingAtFooter` JavaScript this will also try
and stop the elements before they get to the bottom.
## Licence
Released under the MIT Licence, a copy of which can be found in the file `LICENCE`.

2

package.json
{
"name": "govuk_frontend_toolkit",
"version": "0.44.0",
"version": "0.45.0",
"description": "npm for govuk_frontend_toolkit",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc