Jquery瀑布流 如何在元素display属性更改后 把所有left为0的div的class值修改掉
原html代码<style>#feed_div{position:relative;}.item{display:none;}</style><divid="feed_d...
原html代码
<style>
#feed_div { position: relative; }
.item { display: none; }
</style>
<div id="feed_div">
<div class="item">...</div>
<div class="item">...</div>
<div class="item">...</div>
...
<div class="item">...</div>
</div>
导入wookmark
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/jquery.wookmark.min.js"></script>
<script>
jQuery.noConflict();
jQuery('#feed_div .item').wookmark({
container : jQuery("#feed_div"), align:'left',itemWidth:530,autoResize:false,offset:90,verticalOffset:15
});
</script>
使用Jquery wookmark进行瀑布流排版后
<div id="feed_div" style="height: 2051px;">
<div class="item" style="display: block; position: absolute; top: 0px; left: 0px;">...</div>
<div class="item" style="display: block; position: absolute; top: 0px; left: 620px;">...</div>
<div class="item" style="display: block; position: absolute; top: 183px; left: 0px;">...</div>
<div class="item" style="display: block; position: absolute; top: 437px; left: 620px;">...</div>
....
<div class="item" style="display: block; position: absolute; top: 807px; left: 0px;">...</div>
</div>
如何取出Left都为0的div 并追加class="item left" 展开
<style>
#feed_div { position: relative; }
.item { display: none; }
</style>
<div id="feed_div">
<div class="item">...</div>
<div class="item">...</div>
<div class="item">...</div>
...
<div class="item">...</div>
</div>
导入wookmark
<script type="text/javascript" src="./js/jquery.min.js"></script>
<script type="text/javascript" src="./js/jquery.wookmark.min.js"></script>
<script>
jQuery.noConflict();
jQuery('#feed_div .item').wookmark({
container : jQuery("#feed_div"), align:'left',itemWidth:530,autoResize:false,offset:90,verticalOffset:15
});
</script>
使用Jquery wookmark进行瀑布流排版后
<div id="feed_div" style="height: 2051px;">
<div class="item" style="display: block; position: absolute; top: 0px; left: 0px;">...</div>
<div class="item" style="display: block; position: absolute; top: 0px; left: 620px;">...</div>
<div class="item" style="display: block; position: absolute; top: 183px; left: 0px;">...</div>
<div class="item" style="display: block; position: absolute; top: 437px; left: 620px;">...</div>
....
<div class="item" style="display: block; position: absolute; top: 807px; left: 0px;">...</div>
</div>
如何取出Left都为0的div 并追加class="item left" 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询