为什么有人可以告诉我的 ho 使用 javascript 将类 fb_connect 重命名为 fb_connect2?
<fieldset id="fieldset-ezformstep1">
<h3 class="legend">
<a href="#null" class="fb_connect">Connect to facebook</a>
</h3>
</fieldset>
应该是这样
<fieldset id="fieldset-ezformstep1">
<h3 class="legend">
<a href="#null" class="fb_connect2">Connect to facebook</a>
</h3>
</fieldset>
谢谢
最佳答案
你可以使用这个:
$(window).load(function(){ // or document ready but i suspect you need to wait for the window loaded event
$('.fb_connect').toggleClass('fb_connect fb_connect2');
});
关于javascript - 在没有 id 的标签内重命名类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16873864/