AshesOfOwls / jquery.shapeshift

A dynamic grid system with drag and drop functionality.
http://ashesofowls.github.com/jquery.shapeshift/
MIT License
1.67k stars 311 forks source link

Uncaught TypeError: Cannot read property 'left' of undefined #90

Open iltera opened 10 years ago

iltera commented 10 years ago

Using default mixitup configuration " $('#id').mixitup() ", I am adding a filter button dynamically by appending html code for button

  • tag. And calling the same function again instantly after adding html code to the page, in order to make the new button work. After clicking some filter buttons on the page (even if I don't press the new one) animation effects break and on the browser console I see:

    Uncaught TypeError: Cannot read property 'left' of undefined error.

    The error occurs on line 937:

    $toshow.each(function () { var data = this.data;

    data.tX = data.finalPos.left - data.showInterPos.left; //HERE

    I saw on documentation how to add new images to the list by using jquery after method, but there are no explanations about how to dynamically add filter buttons and initialize them on the fly.

    Is the described behaviour expected? That means I am doing something wrong. Then, how to initialize the new filter button correctly?

  • adamongithub commented 7 years ago

    Hi, did you find a solution to this?