jQuery - Assign a html code to a variable -


suppose have code that

<p>hello</p> 

i want assign above code variable, how that?

var content = $('p').html();

ah dammit, late.

if want specific paragraph should give id , use:

var content = $('p#id').html();

instead.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -