I have some HTML inside of a Magento Theme that I am not allowed to edit however I need to come up with some JavaScript to target a really hard to target item and change it's content.
Below is the basic structure of the area I have to work with, I remove all the Siblings and only the relevant code is shown now.
This line <label for="options_2074">None</label>
will always have a ID Number so I cannot use that to target my elements.
But I need to Change the text on that line from None
to Black
and also add
<span id="backingBlackTooltip"><img src="https://www.neonandmore.com/tooltips/question_mark.png"></span>
Right after the closing </label>
tag on that line as well.
I need some help building the JavaScript selector code to achieve this.
Also to note, I cannot use jQuery on this project =(
This is the main stuff I can use... #product-options-wrapper .input-box:first .options-list + .label label
Any help appreciate. There is a JSFiddle set up here.... http://jsfiddle.net/jasondavis/0b61L398/
<div class="product-options" id="product-options-wrapper">
<dl class="last">
<dt><label>Backing</label></dt>
<dd>
<div class="input-box">
<ul id="options-2074-list" class="options-list">
<li>
<input type="radio" id="options_2074" class="radio product-custom-option" name="options[2074]">
<span class="label">
<label for="options_2074">None</label>
</span>
</li>
</ul>
</div>
</dd>
</dl>
</div>