fg-collapsible
Advanced tools
Comparing version 0.2.5 to 0.2.6
{ | ||
"name": "fg-collapsible", | ||
"version": "0.2.5", | ||
"version": "0.2.6", | ||
"description": "Toggle your collapsible content", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -13,2 +13,10 @@ /* | ||
function radioCheckboxChange( isChecked ) { | ||
if( isChecked ) { | ||
this.expand(); | ||
} else { | ||
this.collapse(); | ||
} | ||
} | ||
// Simple auto-init by selector that runs when the dom is ready. Trigger "enhance" if desirable. | ||
@@ -28,8 +36,7 @@ $( document ).bind( "click." + pluginName, function( event ){ | ||
if( isRadio || $link.is( "[type='checkbox']" ) ) { | ||
radioCheckboxChange.call( component, $link[ 0 ].checked ); | ||
// bind so that unchecking other radios in the set will also trigger | ||
$( isRadio ? $( "[name='" + $link.attr( "name" ) + "']" ) : $link ).unbind( "change." + pluginName ).bind( "change." + pluginName, function() { | ||
if( $link[ 0 ].checked ) { | ||
component.expand(); | ||
} else { | ||
component.collapse(); | ||
} | ||
radioCheckboxChange.call( component, $link[ 0 ].checked ); | ||
}); | ||
@@ -36,0 +43,0 @@ } else { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
45633
803