1jQuery(document).ready(function($){'use strict'; 2 3 4 $(document).on( 'click', '.wpmm-right,.wpmm-left', function( event ) { 5 var $that = $(this); 6 if( $that.hasClass('disablebtn') ){ return; } 7 8 var oderby = $that.data('oderby'), 9 column = $that.data('column'), 10 showcat = $that.data('showcat'), 11 type = $that.data('type'), 12 current = $that.attr('data-current'), 13 category = $that.data('category'), 14 total = $that.data('total'), 15 count = $that.data('count'); 16 17 18 if( $that.hasClass('wpmm-right') ){ 19 current = parseInt(current) + 1; 20 if( current == total ){ 21 $that.parent().find('.wpmm-left').removeClass('disablebtn'); 22 $that.addClass('disablebtn'); 23 }else{ 24 if( current == 2 ){ 25 $that.parent().find('.wpmm-left').removeClass('disablebtn'); 26 } 27 } 28 } else { 29 current = current - 1; 30 if( current == 1 ){ 31 $that.parent().find('.wpmm-right').removeClass('disablebtn'); 32 $that.addClass('disablebtn'); 33 }else{ 34 $that.parent().find('.wpmm-right').removeClass('disablebtn'); 35 } 36 } 37 38 39 //console.log( current ); 40 $that.parent().find('.wpmm-right').attr( 'data-current', current ); 41 $that.parent().find('.wpmm-left').attr( 'data-current', current ); 42 43 $.ajax({ 44 url: wpmm_object.ajax_url, 45 type: 'POST', 46 data: { action: 'gridpost_load_more_posts', oderby: oderby, column: column, current: current, category: category, type: type, showcat: showcat, count: count }, 47 beforeSend: function(){ 48 $that.parent().find( ".wpmm-grid-post-addons" ).addClass('spinwarp').append( '<div class="spinners"></div>' ); 49 } 50 }) 51 .done(function(data) { 52 $that.parent().find('.wpmm-grid-post-addons').removeClass('spinwarp').html( data ); 53 }) 54 .fail(function() { 55 console.log( "Failed" ); 56 }); 57 }); 58 59 60 // Tab JS 61 $('.wpmm-vertical-tabs').each(function(){ 62 var $tab = $(this), 63 $handlers = $tab.find('.wpmm-tab-btns').children(), 64 $tabs = $tab.find('.wpmm-tab-content').children(); 65 66 $handlers.each(function(index) { 67 $(this).on('mouseenter', function(event){ 68 event.preventDefault(); 69 $handlers.removeClass('active'); 70 $tabs.removeClass('active'); 71 $(this).addClass('active'); 72 $($tabs[index]).addClass('active'); 73 }); 74 // $(this).on('click', function(event){ event.preventDefault(); }); 75 }); 76 }); 77 78 79});
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.