Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fg-collapsible

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fg-collapsible - npm Package Compare versions

Comparing version 0.2.3 to 0.2.4

2

package.json
{
"name": "fg-collapsible",
"version": "0.2.3",
"version": "0.2.4",
"description": "Toggle your collapsible content",

@@ -5,0 +5,0 @@ "scripts": {

@@ -10,25 +10,20 @@ /*

$( document ).bind( "init", function( e ){
var pluginName = "collapsible";
if( $( e.target ).is( "." + pluginName ) ){
var $collapsible = $( e.target );
var self = $collapsible.data( pluginName );
var menuActiveClass = pluginName + "-menu-active";
var headerClass = "collapsible-header";
var menuActiveClass = "collapsible-menu-active";
self.clearActive = function() {
this.element.find( "." + menuActiveClass ).removeClass( menuActiveClass );
};
function clearActive( $link ) {
$link.closest( "ul,ol" ).find( "." + menuActiveClass ).removeClass( menuActiveClass );
}
self.content.find( "a" ).add( self.header )
.bind( "focus mouseover", function( e ) {
self.clearActive();
$( e.target ).closest( "a,." + self.options.headerClass ).addClass( menuActiveClass );
})
.bind( "blur mouseout", function() {
self.clearActive();
});
$( document.body ).on( "focus mouseover blur mouseout", function( e ) {
var $link = $( e.target ).closest( "a," + headerClass );
var $collapsible = $link.closest( ".collapsible" );
if( $link.length && $collapsible.length ) {
clearActive( $link );
if( e.type === "focus" || e.type === "mouseover" ) {
$link.addClass( menuActiveClass );
}
}
} );
});
})(jQuery, window, document);
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