I'm having trouble making this conditional if statement work properly...
The line " if ( !$section.id == "no-transition" ) " seems to be incorrect.
My goal is to prevent JavaScript from executing on sections with the id "no-transition".
Could someone guide me in the right direction?
function initEvents() {
$sections.each( function() {
var $section = $( this );
if ( !$section.id == "no-transition" ) {
// expand the clicked section and scale down the others
$section.on( 'click', function() {
[code removed for brevity...]
if( !supportTransitions ) {
$section.removeClass( 'bl-expand-top' );
}
$el.removeClass( 'bl-expand-item' );
return false;
} );
}
} );