का अंतिम भाग जोड़ें, मैं निम्नलिखित मूल्यों और पाठ को एक साथ डीआईवी में लपेटने की कोशिश कर रहा हूं।jQuery div का पहला भाग जोड़ें, फिर div seperatley
<table cellspacing="0" cellpadding="0" border="0" class="thePrices">
<tbody><tr>
<td>
<font class="text colors_text">
<b>MSRP: <span class="priceis">$90.00</span></b>
</font><br>
<b><font class="pricecolor colors_productprice">
<font class="text colors_text"><b>Burkett Price:</b></font>
<span class="priceis">$289<sup>.99</sup></span>
</font>
</b><br>
<a href="a link">A link goes here</a>
<table>A TABLE WITH STUFF GOES HERE</table>
</td>
</tr></tbody>
</table>
यह है कि मैं क्या करने की कोशिश कर रहा हूँ:
यह है कि मैं क्या है
<table cellspacing="0" cellpadding="0" border="0" class="thePrices">
<tbody><tr>
<td>
**<div class="pricebox">**
<font class="text colors_text">
<b>MSRP: <span class="priceis">$90.00</span></b>
</font><br>
<b><font class="pricecolor colors_productprice">
<font class="text colors_text"><b>Burkett Price:</b></font>
<span class="priceis">$289<sup>.99</sup></span>
</font>
</b><br>
**</div>**
<a href="a link">A link goes here</a>
<table>A TABLE WITH STUFF GOES HERE</table>
</td>
</tr></tbody>
</table>
यह काम नहीं करता है, लेकिन आप मैं गलत क्या कर रहा करने के विचार मिलता है:
$(document).ready(function() {
$('.thePrices').find('td').find('font:first').before('<div class="pricebox">');
$('.thePrices').find('.colors_productprice').find('b').after('</div>');
});
शायद मुझे SLICE का उपयोग करना चाहिए?
को बदलना चाहते हैं तो क्या आप कृपया आउटपुट को कैसा दिखाना चाहते हैं, इसके बारे में और बता सकते हैं? – Dhiraj
निश्चित रूप से, मैं सिर्फ प्रथम फ़ॉन्ट टैग और बी टैग को div..in में कक्षा 'pricebox' के साथ एक साथ लपेटना चाहता हूं। – ToddN