JQuery Masonry ! Update columnWidth On Window Resize
问题 I'm working working on Responsive Layout where I'm using JQuery Masonry as well. I'm using following script to get current column width. var curWidth; var detector; detector = $('.magic-column'); curWidth = detector.outerWidth(true); $(window).resize(function(){ if(detector.outerWidth(true)!=curWidth){ curWidth = detector.outerWidth(true); } }); My JQuery Masonry init script is something like this.. $(window).load(function(){ $(function (){ $wall.masonry({ singleMode: true, columnWidth: