1$(function(){ 2 $('#nav-main a.has-childrens').click(function(){ 3 if( $(window).width() < 769){ 4 if( !$(this).data( 'clicked') && !$(this).parent().hasClass( 'current')){ 5 $(this).parent().addClass( 'current'); 6 $(this).data( 'clicked', true); 7 return false; 8 } 9 } 10 }); 11}) 12 13 14$('body').delegate( '[data-slidenav]', 'click', function(){ 15 var el = $(this).attr( 'data-slidenav'); 16 $(this).toggleClass( 'active'); 17 $('[slidenav=' + el + ']').toggleClass( 'active'); 18 $('[slidenav-canvas]').toggleClass( 'active'); 19 $('body').toggleClass( 'slidenav-' + el); 20}) 21 22$('[tab]').click(function(){ 23 var isOpen = $($(this).attr( 'tab-id')).hasClass( 'active'); 24 $('[tab=' + $(this).attr( 'tab') + ']').removeClass( 'active'); 25 $('[tab-content=' + $(this).attr( 'tab') + ']').removeClass( 'active'); 26 27 if( isOpen){ 28 $($(this).attr( 'tab-id')).removeClass( 'active'); 29 $(this).removeClass( 'active'); 30 } else { 31 $($(this).attr( 'tab-id')).addClass( 'active'); 32 $(this).addClass( 'active'); 33 } 34}) 35 36// Slidemenu 37$('[data-slidemenu]').click(function(){ 38 $('[slidemenu=' + $(this).attr( 'data-slidemenu') + ']').toggleClass( 'active'); 39}); 40 41$('body').on( 'storeAddItem', function(){ 42 $('[slidenav=cart]').toggleClass( 'active'); 43 $('[slidenav-canvas]').toggleClass( 'active'); 44 $('body').addClass( 'slidenav-cart'); 45})
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.