fg-collapsible
Advanced tools
Comparing version 0.2.6 to 0.2.7
{ | ||
"name": "fg-collapsible", | ||
"version": "0.2.6", | ||
"version": "0.2.7", | ||
"description": "Toggle your collapsible content", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -13,10 +13,2 @@ /* | ||
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. | ||
@@ -34,10 +26,10 @@ $( document ).bind( "click." + pluginName, function( event ){ | ||
if( component ) { | ||
var isRadio = $link.is( "[type='radio']" ); | ||
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() { | ||
radioCheckboxChange.call( component, $link[ 0 ].checked ); | ||
}); | ||
if( $link.is( "[type='radio']" ) ) { | ||
$( "[name='" + $link.attr( "name" ) + "']" ).unbind( "change." + pluginName ).bind( "change." + pluginName, function() { | ||
if( $link[ 0 ].checked ) { | ||
component.expand(); | ||
} else { | ||
component.collapse(); | ||
} | ||
}).trigger( "change" ); | ||
} else { | ||
@@ -44,0 +36,0 @@ component.toggle(); |
Sorry, the diff of this file is not supported yet
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
45677
797