1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
|
$jq(".fppOptions :checkbox").bind( "change", function(){
var a = [ "categories", "attributes", "manufacturers", "features", "tags" ],
str = this.className.slice( 4 ),
num = $jq.inArray( str, a ),
jObj = $jq( this ),
jObjHeader = $jq( "#fppHeader_" + str );
if ( num > -1 ){
if ( jObj.is( "checked" ,true) ){
FPPRecord.add( a[b], $jq( this ).val() );
if ( ! jObjHeader.hasClass( "active" ) ){
jObjHeader.addClass( "active" );
}
} else {
FPPRecord.remove( a[b], $jq( this ).val() );
if ( $jq( "#fppSlide_" + str ).find( ":checked" ).length < 1 ){
jObjHeader.removeClass( "active" );
}
}
}
FPPRecord.sendRequest()
}); |
Partager