IE issue with jQuery masonry call

2019-05-30 04:54发布

问题:

I have a masonry call which is working fine in all browsers but IE7 and below. Maybe its just a simple syntax issue, but maybe someone has had experience of this before. Code below:

$(function(){
  $('#mainContent').masonry({
    columnWidth: 200, 
    itemSelector: '.threadWrapper:visible',
    resizeable: true,
    saveOptions: true,  
  });
});

Below is the error message (line 41 is the fist attribute declaration - columnWidth):

alt text http://www.kalpaitch.com/info/masonrybug.jpg

回答1:

You have an extra , after saveOptions: true. Maybe IE7 is less tolerant.