Jump to content

jQuery appendTo not appearing in View Source


jcanker

Recommended Posts

I'm creating some <div>s based on returned data.  The text shows up where it's supposed to, but if I select "View Source" in IE8 (haven't tried on FF, Chrome, etc yet) The div's don't appear.  What gives?  Why isn't the view source showing the updated DOM doc?

  	$("#centerColumn").empty();
  	var customerOutput = '<div id="customerInfo"><div id="busname">Customer Name: '+$(this).find("busname").text()+'</div></div>';
  	customerOutput +='<div id="buscode">Buscode: '+$(this).find("buscode").text()+'</div>';
$(customerOutput).appendTo("#centerColumn");
  	

That is how Javascript works (and is not jQuery specific). It doesn't actually manipulate the html, but the DOM stored within the browser itself.

 

Get yourself Firebug and you will be able to see what the code would look like after the DOM has been manipulated.

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.