1jQuery(document).ready(function($){ 2 3 4 $('.loadmore').click(function () { 5 var form_data = jQuery("#career_form").serialize(); 6 if ( jQuery("#career_category").val() != '' ){ 7 8 } 9 var button = $(this), 10 page = button.attr('data-page'), 11 newPage = parseInt(page) + 1, 12 maxPage = loadmore_params.max_page; 13 $.ajax({ 14 url: loadmore_params.ajaxurl, 15 type: 'post', 16 data: { 17 action: 'loadmore', 18 query: loadmore_params.posts, 19 page: newPage, 20 formdata: form_data, 21 //security: loadmore_params.security, 22 }, 23 beforeSend:function(){ 24 $('.loadmore').text("Loading"); 25 }, 26 success: function (html) { 27 $('.loadmore').text("Load More Listings"); 28 29 if (html) { 30 $('.clt_careers').append(html); 31 button.attr('data-page', newPage); 32 33 if (newPage == maxPage) { 34 button.hide(); // if last page, remove the button 35 } 36 } else { 37 button.hide(); // if no data, remove the button as well 38 } 39 }, 40 }); 41 }); 42 43 jQuery(".search_opening").click(function(){ 44 var form_data = jQuery("#career_form").serialize(); 45 $.ajax({ 46 url: loadmore_params.ajaxurl, 47 type: 'post', 48 data: { 49 action: 'filter', 50 formdata: form_data, 51 }, 52 beforeSend:function(){ 53 jQuery(".search_opening").text("Loading"); 54 }, 55 success: function (html) { 56 jQuery(".search_opening").text("Search Openings"); 57 if( html != '' ) { 58 $('.clt_careers').html(html); 59 $('.loadmore').attr('data-page',1); 60 $('.loadmore').show(); 61 } else { 62 $('.clt_careers').html("No Results Found"); 63 $('.loadmore').hide(); 64 } 65 66 }, 67 }); 68 }) 69})
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.