1jQuery('.sp-floating-btn').each( function(){ 2 3 var $btn = jQuery( this ), 4 row_id = jQuery( $btn ).data( 'popup' ), 5 scroll_top = 400; 6 7 function display(){ 8 if( window.pageYOffset >= scroll_top ){ jQuery( $btn ).fadeIn(); } 9 else{ jQuery( $btn ).fadeOut(); } 10 } 11 12 if( row_id ){ 13 rowOffset = jQuery( '#'+ row_id ).offset(); 14 scroll_top = rowOffset.top - 50; 15 } 16 17 display(); 18 19 jQuery( window ).scroll( function(){ 20 display(); 21 }); 22 23}); 24 25jQuery("[data-behaviour~=inline-modal]").each( function(){ 26 27 var $modal = jQuery( this ), 28 $overlay = $modal.find( '.inline-overlay' ), 29 $closeBtn = $modal.find( 'button.close' ); 30 31 $overlay.click( function( ev ){ 32 hideModal(); 33 }); 34 35 $closeBtn.click( function( ev ){ 36 ev.preventDefault(); 37 hideModal(); 38 }); 39 40 function hideModal(){ 41 $modal.removeClass('show-modal'); 42 } 43 44}); 45 46jQuery("[data-toggle~=sow-modal]").each( function(){ 47 48 var $button = jQuery( this ); 49 50 $button.click( function( ev ){ 51 ev.preventDefault(); 52 53 var $modal = jQuery( $button.attr( 'href' ) ); 54 55 // map within the modal 56 if( $modal.find( '[data-behaviour~=choropleth-map]' ).length && !$modal.find( '[data-behaviour~=choropleth-map]' ).html() ){ 57 $modal.find( '[data-behaviour~=choropleth-map]' ).choropleth_map(); 58 console.log('trigger map'); 59 } 60 61 $modal.addClass('show-modal'); 62 }); 63 64});
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.