Hi I am looking to find HTML contained on the page and replace it using jQuery.
I have spent hours looking at similar questions on here but I couldn't find any that achieve exactly what I am looking for.
I have the following HTML on my page
<div id="mCSB_1_container" class="mCSB_container" dir="ltr" style="position:relative; top:0; left:0;">
<label class="">
<input type="checkbox" value="blazers">
<span>
Blazers & Waistcoats
<span class="prdctfltr_count">6/8</span>
</span>
</label>
<label class="">
<input type="checkbox" value="coatsjackets">
<span>
Coats & Jackets
<span class="prdctfltr_count">1/3</span>
</span>
</label>
</div>
And I need a way to say find the following code
<label class="">
<input type="checkbox"
and replace it with
<option class=""
So far all the other questions I have looked at seem to replace the entire tag which loses the value="" attribute I need to keep.
Any assistance would be appreciated.
Edit: I need to end up with something along the lines of the code below but I'm taking it one step at a time
<div id="mCSB_1_container" class="mCSB_container" dir="ltr" style="position: relative; top: 0px; left: 0px;">
<select>
<option class="" value="blazers">
Blazers & Waistcoats
</option>
<option class="" value="coatsjackets">
Coats & Jackets
</option>
</select>
</div>