The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jQuery slide Re: jQuery slide


I think I understand now.

I think you might need to target the `section.content` instead of `#ajax` because the content includes the pagination and if you get that, you can determine if there are more pages from `l-arrow` and `r-arrow` (which don’t seem to be updating on the main page). So try something like this:

var ajax = $(‘#ajax’),
result, link;
selector : ‘.r-arrow, .l-arrow’,
insert : function(urlFragment,target,data){
ajax.hide(“slide”, { direction: “left” }, 500, function(){
result = $(data);
$(target).html(data);“slide”, { direction: “right” }, 500);
// update navigation arrows
link = result.find(‘.l-arrow’).attr(‘href’) || ”;
$(‘.l-arrow’).attr(‘href’, link).toggleClass(‘active’, link !== ”);
link = result.find(‘.l-arrow’).attr(‘href) || ”;
$(‘.r-arrow’).attr(‘href’, link).toggleClass(‘active’, link !== ”);
success : function(urlFragment,target){

I haven’t tested it, but hopefully it will help.