New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.1.3 to 0.1.4

2

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

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

@@ -23,16 +23,36 @@ /*

// tapout/clickout behavior
$( document ).bind( "touchstart." + pluginName + " click." + pluginName, function( a ){
// if the event target is not in the collapsible, and the collapsible is expanded, and it's a menu presentation... collapse it!
if( !$( a.target ).closest( e.target ).length &&
!$( a.target ).closest( $trigger ).length &&
!$collapsible.data( pluginName ).collapsed &&
isMenu() ){
var targetTop;
var touchCancel = false;
$( "body" )
.bind( "gesturestart." + pluginName, function( a ){
touchCancel = true;
})
.bind( "touchstart." + pluginName, function( a ){
targetTop = a.target.getBoundingClientRect().top;
})
.bind( "touchend." + pluginName + " click." + pluginName, function( a ){
if( a.type === "touchend" ){
if( targetTop && Math.abs( targetTop - a.target.getBoundingClientRect().top ) > 5 ){
touchCancel = true;
}
}
setTimeout(function(){
$collapsible.data( pluginName ).collapse();
});
a.preventDefault();
}
} );
// if the event target is not in the collapsible, and the collapsible is expanded, and it's a menu presentation... collapse it!
if( !$( a.target ).closest( e.target ).length &&
!$( a.target ).closest( $trigger ).length &&
!$collapsible.data( pluginName ).collapsed &&
isMenu() &&
touchCancel === false ){
setTimeout(function(){
$collapsible.data( pluginName ).collapse();
});
a.preventDefault();
}
setTimeout( function(){
targetTop = null;
touchCancel = false;
}, 200 );
} );
// hover behavior for collapsibles and triggers relies on the presence of data-collapsible-hover attr

@@ -39,0 +59,0 @@ if( $collapsible.is( "[data-collapsible-hover]" ) ){

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