Jquery unload or revert back to original content

157 Views Asked by At

I'm using mixitup to filter items in my grid. This works great. But when I click on the first thumb, I use:

$(".thumbs#one").click(function(){
$( "#Grid" ).load('project_sample.html .project_thumb');
});

To load different thumbs called from another HTML.

Once these new thumbs are loaded, the mixitup filter mode becomes unavailable and I want to be able to go back to the original 'grid filtering layout' when I click on ALL.

I have tried :

$('ul.menu > li:first').click(function () {
$( "#Grid" ).load('index.html .mix, .thumbs');
});

But it's not only not working, it's also wrong. What I need is a conditional, in case the thumbs aren't already loaded. Can anyone help me with this?

Or maybe-in other words-is there a way to 'unload' or 'revert' back to the original content on click?

I've uploaded a jsfiddle although the .load function isn't really working as it's not running on the server.

http://jsfiddle.net/m/xjy/

Thanks!

0

There are 0 best solutions below