Jump to content

including a variable in jquery append()


Zeradin

Recommended Posts

why doesn't this work

 

$("#add_domain").click(function(){
			$("div#dom_entry").append('<div class="entry_field" id="dom_entry">Domain Name:<br />http://<input type="text" name="domain_name'+ num_domains +'" id="domain_name'+ num_domains +'" onKeyPress="return nogarbageone(this, event)" /></div>');
		num_domains++;

it just spits out num_domains like it's text. please advise. thanks :)

Link to comment
https://forums.phpfreaks.com/topic/196414-including-a-variable-in-jquery-append/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.