我有一組錨狀jQuery的腳本來匹配元素的屬性轉移到自己的孩子
<a class="lb" href="#">text</a>
<a class="lb" href="#" style="width:200px">text</a>
<a class="lb" href="#" style="color: reen; width:200px">text</a>
需要被轉化爲以下幾點:
<a class="lb" href="#"><span>text</span></a>
<a class="lb" href="#"><span style="width:200px">text</span></a>
<a class="lb" href="#" style="color:green"><span style="width:200px">text</span></a>
我有沒有問題創造孩子span
,但不知道如何移動父母的width
樣式。
這是沒有問題的我。真正的問題是將錨的寬度移動到兒童跨度:( – UserControl 2010-06-14 07:14:57