Hello people, I'm new to this forum. I was a member of stack overflow for a while, but the account eventually got suspended for what they thought was a mis-use of information - because of that harsh environment, I google'd an alternative. This seems like a brilliant one.
so, we have the body and container elements;
and we need to manipulate the DOM, specifically the container ID;
$('#container').append("The first insance");
$('body > div').append("The Second Instance");
$('body #container').append("The Third Instance");
OK, so you're probably thinking "There's more than that." .....
$('div#container').append"(The Final Instance");
#2 is structure dependant - the selector is assuming you have
directly below the body tag. If you do not, the selector will return the div that is.
<div id="container">The First Instance</div>
So, we may or may not know that the variations are available because each one will suit the needs which the page requires and some can be a benefactor for speed.
but, what is this?
var is a stored variable of sorts. if you are familiar with this syntax, you can probably use your imagination to complete the variable.
anyway, thanks for reading. I'm usually a silent stalker of code, I pulled out something relatively mondane, making the effort for my introduction, 'yano?