JQuery span tag change value - link from another div
So my html code is:
<div class="product-details"> <div class="availability in-stock"> Availability: <span>In stock</span> </div> </div> I would like to use jQuery to change the value of the range "in stock". I am somewhat new to Javascript and JQuery, so how would I change this range value without using an identifier for the link.
Thank you very much in advance!
+6
3 answers
What you are looking for is either text() or html() , for example:
$('.availability span').html('This is what you want to change it to'); Here is an example: JsFiddle Demo
+3