<html>
<body>
<div class="hdd">
<div class="hdd_Left">
A
</div>
<div class="hdd_Center">
B
</div>
<div class="hdd_Right">
C
</div>
</div>
</body>
</html>
我想使用调用一个变量
<script>
$(".hdd").each(function() {
$(this).fadeTo(500,1);
$(this).getElementsByClassName("hdd_Left").animate({'margin-right': '100px'},"slow"); //doesn't work
}
</script>
$(this).getElementsByClassName("hdd_Left").animate({'margin-right': '100px'},"slow");
这行不行。
谢谢
你真的应该写。不要混合使用 Vanilla JS 和 Jquery。
$(this).find(".hdd_Left").animate({'margin-right': '100px'},"slow");
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句