Stop javascript from executing -
i know simple cant conditional if below work...
this line below " if ( !$section.id == "no-transition" ) " not correct.
i'm trying stop javascript working on section elements have id of "no-transition".
can point me in right direction?
function initevents() { $sections.each( function() { var $section = $( ); if ( !$section.id == "no-transition" ) { // expand clicked section , scale down others $section.on( 'click', function() { [code taken out shorten post...] if( !supporttransitions ) { $section.removeclass( 'bl-expand-top' ); } $el.removeclass( 'bl-expand-item' ); return false; } ); } } );
you should not have multiple elements same id on page.
your if condition should modified to:
... if ( $section.attr('id') != "no-transition" ) { ...
Comments
Post a Comment