Skip to content Skip to sidebar Skip to footer

Bootstrap Modal Stops Working After I Sort Portfolio

I am building a sortable portfolio using quicksand.js, to display more information on click I am using bootbox.js, now this is working pretty well but I recently ran into an issue.

Solution 1:

UPDATED: I saw that the quicksand plugin allows for a callback function.

I believe what's happening here is the elements are losing their event handlers when they get sorted due to the elements being cloned and the gallery() function only being called on (document).ready. The elements that display after being sorted are 'new' and have not got an event listener attached.

In portfolio.js, try calling the gallery() function after sorting the items via the quicksand callback argument

...

// call quicksand and assign transition parameters$holder.quicksand($filteredData, {
  duration: 800,
  easing: 'easeInOutQuad'
}, gallery);

...

Also, I see that you have gallery as the callback in the code you posted here, but I don't think that's the code that is running. I think portfolio.js is what's running to do the sorting.

Post a Comment for "Bootstrap Modal Stops Working After I Sort Portfolio"