0

My source code is:

<div id="id1" class=class1>
<label><input type="checkbox" name="something">uh, this is label</label>
</div>  

I would like add i tag after input tag. Source code will be looks like:

<div id="id1" class=class1>
<label><input type="checkbox" name="something"> <i class="genius"></i> uh, this is label</label>
</div> 

Is it possible by JavaScript?

sona
  • 23
  • 1
  • 8
  • What research have you done, and what have you attempted on your own prior to asking us? Or are you just asking "Is it possible?" - in which case, "Yes. Have a nice day." – Tyler Roper Aug 22 '17 at 20:37
  • 2
    @RajeshPaudel Why use expensive APIs like jQuery when you don't have to? And @Shruti, `` tags are often used for icons, etc, that make use of CSS pseudo-elements. [**Example**](https://jsfiddle.net/99ngwwcv/) – Tyler Roper Aug 22 '17 at 20:39
  • 1
    Already answered here: https://stackoverflow.com/a/4793630/3561995 – SteamDev Aug 22 '17 at 20:45
  • Hi great question, i did not tried yet but i am just thinking how is possible, its making hard for me. My source code is encrypted, that's why i need add this tag by using JavaScript. If you have any idea, please share me. Thanks. – sona Aug 22 '17 at 20:55
  • I have found something and as i can see its working on fiddle. http://jsfiddle.net/sanjida96xq2/8sQqB/16/ But unfortunately, my cms with not working due to the input fields comes through ajax loading. Is there any solution, hows work while ajax loading? – sona Aug 22 '17 at 23:01
  • Any idea about the ajax issue? – sona Sep 06 '17 at 12:46

0 Answers0