javascriptjqueryjquery-masonryjqmodal

After I trigger a jqmodal and close it ,my website get a Uncaught TypeError


My website is runnable(include a onclick slidetoggle,masonry ....)

before i trigger a jqmodal,

but when i trigger a jqmodal and close it,

my website is get a "Uncaught TypeError: Object [object Object] has no method 'masonry'"

I think i need to add a reload when the jqmodal close.

but i don't know how to do in js

Any idea? Or the other possible errors ?

my sources code------

<script src="js/jquery.min.js"></script>
<script src="js/jqModal.js" type="text/javascript"></script>
<script src="js/jquery.masonry.min.js"></script>
     <script>

              $("#Item-search-bar").click(function(){
                $("#Item-search-list").slideToggle(500,function(){
                    $('#container').masonry();
here got error-->"Uncaught TypeError: Object [object Object] has no method 'masonry' "
                });
             });

  </script>

Solution

  • This error means the masonry plugin was not loaded. Most likely the jquery.masonry.min.js file is missing or has a different filename.

    In the browser if you View -> Source, you can click the link to the Javascript file to see if it exists or not.