1
我使用這個腳本包兩個div:wrapAll()僅適用於第一個元素?
的jQuery:
$("#wrapcb").click(function(){
$('#cboxOverlay, #colorbox').wrapAll('<div class="wrapcolorbox">');
});
HTML:
<span><a id="wrapcb" href="http://www.example.com/one">First link</a></span>
<span><a id="wrapcb" href="http://www.example.com/two">Second link</a></span>
<span><a id="wrapcb" href="http://www.example.com/three">Third link</a></span>
奇怪的是,這個腳本只在作品上第一個環節和其他所有人都被忽略。
任何想法我做錯了什麼?
感謝,做工精細現在:) – Kev89 2013-03-24 23:05:54