
軽快な動作で要素をウィンドウ幅に応じてタイル状に並べることができる「Wookmark jQuery Plugin」
2013年7月4日jQueryプラグイン活用
jQueryプラグイン「Wookmark jQuery Plugin」を使用すると、ウィンドウ幅に応じて要素や画像をタイル状に並べることができます。タイル状に並べることできるプラグインの中では比較的動作が軽めです。
JavaScript
(function($){ $(function() { $('#container .box').wookmark({ offset: 1, itemWidth: 140, autoResize: true }); }); })(jQuery);
HTML
<div id="container"> <div class="box size01 bgColor01"></div> <div class="box size02 bgColor02"></div> <div class="box size03 bgColor03"></div> </div>
CSS
#container { position: relative; }