jQuery等高排列插件matchHeightjQuery等高排列插件matchHeight是一款响应式平等高度插件jquery.matchHeight。jQuery响应式瀑布流jQuery插件
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.matchHeight.js"></script>
<script type="text/javascript">
(function() {
/* matchHeight example */
$(function() {
// apply your matchHeight on DOM ready (they will be automatically re-applied on load or resize)
// get test settings
var byRow = $('body').hasClass('test-rows');
// apply matchHeight to each item container's items
$('.items-container').each(function() {
$(this).children('.item').matchHeight(byRow);
});
// example of removing matchHeight
$('.test-remove').click(function() {
$('.items-container').each(function() {
$(this).children('.item').matchHeight('remove');
});
});
});
})();
</script>
热门源码