This code is for a filterable portfolio. Originally I had PHP for the next and previous links, but when the portfolio is filtered it doesn't find the next filtered object. I found that the filter places the list items next to each other in the DOM so I used next() to get the result. However, the link isnt loading properly. Its a link on the same page that loads thickbox. I have successfully got it to open in a new window and append to the window url, but no dice trying to get it to work. Here is the address of said portfolio.
http://blurosemedia.com/portfolio
$(document).ready(function(){
$(".portfolio-next").click(function(e) {
var $this = $(this);
if($this.data('clicked', true)) {
var namer = $(this).attr('value');
var url = $(this).parents('body').children('#wrap').children('#inner').children('#content-sidebar-wrap').children('#content').children('ul#portfolio-list').children().next('.portfolio-item-' + namer).nextAll('.portfolio-item:not(:.isotope-hidden)').attr('id');
window.location.load(url);
e.preventDefault();
}
});
});
I had to climb all the way up the dow tree because the thickbox code automatically shows on the bottom of the page. One possible solution I thought was in order to get thickbox to load you must have class="thickbox". If I could somehow say load(url).withClass('thickbox') it might work, but I'm sure how the syntax should be.