1//JavaScript for Smart Social Media Widget 2jQuery( document ).ready(function( $ ) { 3 4 //Toggle options for different styles 5 $( '.ssmw-radio').on( "click", function() { 6 if( $(this).val() == 'simple' ) { 7 $('.ssmw-align').show(); 8 $('.ssmw-rows').show(); 9 $('.ssmw-color').show(); 10 } else if ( $(this).val() == 'boxed' ) { 11 $('.ssmw-align').hide(); 12 $('.ssmw-rows').hide(); 13 $('.ssmw-color').hide(); 14 } 15 }); 16 17 18 $( '.ssmw-dropdown-button' ).on( "click", function() { 19 20 var toggle = $( this ).children( 'span' ); 21 $( this ).next().slideToggle(); 22 23 //Toggle arrow 24 if( toggle.hasClass( 'ssmw-closed' ) ) { 25 toggle.removeClass('ssmw-closed'); 26 toggle.addClass('ssmw-opened'); 27 } else { 28 toggle.removeClass('ssmw-opened'); 29 toggle.addClass('ssmw-closed'); 30 } 31 }); 32 33 //When save is clicked in widget.php 34 jQuery(document).on('widget-updated', function( e, widget){ 35 36 37 $( '.ssmw-radio').on( "click", function() { 38 if( $(this).val() == 'simple' ) { 39 $('.ssmw-align').show(); 40 $('.ssmw-rows').show(); 41 $('.ssmw-color').show(); 42 } else if ( $(this).val() == 'boxed' ) { 43 $('.ssmw-align').hide(); 44 $('.ssmw-rows').hide(); 45 $('.ssmw-color').hide(); 46 } 47 48 }); 49 50 51 $( '.ssmw-dropdown-button' ).on( "click", function() { 52 53 var toggle = $( this ).children( 'span' ); 54 $( this ).next().slideToggle(); 55 56 if( toggle.hasClass( 'ssmw-closed' ) ) { 57 toggle.removeClass('ssmw-closed'); 58 toggle.addClass('ssmw-opened'); 59 } else { 60 toggle.removeClass('ssmw-opened'); 61 toggle.addClass('ssmw-closed'); 62 } 63 }); 64 65 66 67 }); 68 69}); 70 71
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.