javascript - preview of text using jquery -


i have following html

<img src="a.jpg" /><p> random text , test example. random text , test example. random text , test example<p> <br><p>this random text , test example random text , test example</p> <img src="a.jpg" /> <br><p>this random text , test example random text , test example</p>

my question if have give preview of text using jquery suppose have in variable named html how display few parts of text ignoring images

       <div id="preview"></div>        $("#preview").val("//display text in variable named html")  

you filter images html:

var somehtml = '....'; $('#preview').html($(somehtml).filter(':not("img")')); 

Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -