我使用jquery.cjobjectScaler插件(link text),并且由于我无法控制的情况,img在div中超链接...我没有任何方法“去掉”该标签,也不能重新排序在所有...jquery - 获取父级的父级?
因此,原有的功能是这样的:
$("#productGrid li img").cjObjectScaler({
destObj: $("#productGrid li img").parent("li"), // must be a jQuery object (required)
method: "fit", // can either be fit or fill (default fill)
fade: 800 // if a positive integer, will hide and fadeIn object n duration (default 0)
});
/* CSS for above */
ul#productGrid li {
position: relative;
display: block;
width: 190px;
height: 150px;
border: 1px solid #ccc;
float: left;
margin-right:
10px; margin-bottom:
10px; overflow: hidden;
}
这是我想要使用的版本...
$(".ffts a img").cjObjectScaler({
destObj: $(".ffts a img").parent("a"),
method: "fill",
});
/* css for above */
.ffts a {
width: 550px;
height: 300px;
}
/* here's the markup */
<div class="ffts">
<a href="/img" style="position: relative;">
<img src="/source/image.jpg" />
</a>
</div>
而且,它调整大小,但不是为fft设置的尺寸...我已经验证呃,这种风格没有被覆盖,所以不知道从哪里去......?
这是什么调整到呢? 'ffts'? – 2009-12-11 06:15:25