🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
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

to
0.44.0

govuk_frontend_toolkit/javascripts/govuk/primary-links.js

31

govuk_frontend_toolkit/README.md

@@ -658,3 +658,3 @@ # GOV.UK Frontend Toolkit

If you have a complex test, it may be worth extending MultivariateTest with
If you have a complex test, it may be worth extending MultivariateTest with
your own. Callbacks can be strings which will call a method of that name

@@ -673,5 +673,34 @@ on the current object.

## Primary Links
`GOVUK.PrimaryList` hides elements in a list which don't have a supplied
selector, they will then be shown when the user clicks. `GOVUK.primaryLinks` is
a helper to add this behaviour to many elements.
Example markup:
```html
<ul id="primary-list">
<li class="primary-item">Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
</ul>
```
To add it to all lists which have items with the class `primary-item` use
something like:
```javascript
GOVUK.primaryLinks.init('.primary-item');
```
Or to add it just to that list you could use:
```javascript
new GOVUK.PrimaryList($('#primary-list'), '.primary-item');
```
## 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.43.1",
"version": "0.44.0",
"description": "npm for govuk_frontend_toolkit",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet