How can I insert text in the middle of text?
This is my code:
<div class="MyText"> some content some dynamic dontent. my color is BLUE. some content </div>
Here I need to change the Value “Blue” to any other color by Jquery. Other Content in the div is come dynamically, So Apart from html(), append(), is there any way to fill it like php ?
Here we can do it via php like this
<div class="MyText"> some content some dynamic dontent. my color is <?php echo("blue") ?>. some content </div>
Can we do it in Jquery/ Javascript ?
Thanks in Advance
Use a SPAN tag with an id you can easily retrieve. Then you can change the content safely without having to resort to brittle manipulation.