• hello my english is very bad, sorry.

    I use the plugin in ajax mode, it does not in default mode.

    how it works when I click to the next page of results that it will jump to the top of the div?

Viewing 1 replies (of 1 total)
  • Plugin Author TC.K

    (@wp_dummy)

    You will need to edit the ultimate-wp-query-search-filter/trunk/classes/scripts/uwpqsfscript.js .
    Either in this event:

    $('body').on('click','.upagievent', function(e) {
    			var pagenumber =  $(this).attr('id');
    			var formid = $('#curuform').val();
    			upagi_ajax(pagenumber, formid);
    			return false;
    		});

    or

    window.upagi_ajax = function (pagenum, formid) {
    			var ajxdiv = $(''+formid+'').find("#uajaxdiv").val();	
    			var res = {loader:$('<div />',{'class':'umloading'}),container : $(''+ajxdiv+'')};
    			var getdata = $(''+formid+'').serialize();
    		
    			jQuery.ajax({
    				 type: 'POST',	 
    				 url: ajax.url,
    				 data: ({action : 'uwpqsf_ajax',getdata:getdata, pagenum:pagenum }),
    				 beforeSend:function() {$(''+ajxdiv+'').empty(); res.container.append(res.loader);},
    				 success: function(html) {
    				  res.container.find(res.loader).remove();
    				  $(''+ajxdiv+'').html(html);
    				
    				//res.container.find(res.loader).remove();
    				 }
    				 });
    		}

    You can add scrolling animation to the div after the click on the pagination. Eg:
    $("html, body").animate({ scrollTop: $("#toTHIS").offset().top }, 500);

Viewing 1 replies (of 1 total)
  • The topic ‘How to jump the top of div (ajax)’ is closed to new replies.