1(function( $ ) { 2 "use strict"; 3 $( '.bt_bb_accordion_item_title' ).click(function() { 4 var $item = $( this ).closest( '.bt_bb_accordion_item' ); 5 if ( ! $item.hasClass('on') ) { 6 $( this ).closest( '.bt_bb_accordion' ).find( '.bt_bb_accordion_item.on' ).removeClass( 'on' ); 7 $item.addClass( 'on' ); 8 if( ! window.initialaccordion ){ 9 // var diff = $( this ).offset().top + $( this ).closest( '.bt_bb_accordion_item' ).outerHeight() - ( $( 'html' ).scrollTop() + $( window ).height() ); 10 // var diff = $( this ).offset().top - ( $( 'html' ).scrollTop() ); 11 // console.log( isOnScreen( $(this) ) ); 12 var top_of_element = $item.offset().top; 13 var bottom_of_element = $item.offset().top + $("#element").outerHeight(); 14 var bottom_of_screen = $( window ).scrollTop() + $(window).innerHeight(); 15 var top_of_screen = $( window ).scrollTop(); 16 var diff = top_of_screen - top_of_element; 17 if( diff > 0 ) { 18 $( 'html' ).scrollTop( $( 'html' ).scrollTop() - diff - 15 ); 19 } 20 21 } else { 22 window.initialaccordion = false; 23 } 24 25 } else { 26 $( this ).closest( '.bt_bb_accordion_item' ).removeClass( 'on' ); 27 } 28 }); 29 $( '.bt_bb_accordion' ).each(function() { 30 if ( $( this ).data( 'closed' ) != 'closed' ) { 31 window.initialaccordion = true; 32 $( this ).find( '.bt_bb_accordion_item_title' ).first().click(); 33 } 34 }); 35})( jQuery );
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.