Description
learn.jquery.com/page/using-jquery-core/selecting-elements.md
it is unclear the relationship between the objects of jQuery and the javascript method document.getElementById()
I ran into this because I tried to change a simple attribute of a div... using the jQuery I was unsuccessful. I figured the objects might be the same or at least inherited property. So I checked and container1 is definitely different from container2...
Bottom line... the reader is likely to arrive at this page AFTER they have studied javascript and DOM. Therefore it would be nice to know the relationship between these jQuery Selectors and the getElementById() as provided by javascript.
As of writing this... I still haven't figured out why the attr setter is not working for container 1.. Is there a buffer flush or something?? Does it have to do with that dynamic vs static object concept??? I don't know it's not clear in the documentation... This page is more focused on the unique 'section' features than actually telling us what type of object it selects and returns.
/```
/ Hidden Elements initially
var form1 = $("#createSessionSignupForm").attr("display", "none");
alert("flag1");
var container1 = $("#loginBoxContainer").attr(
{
display: "none",
backgroundColor: "red"
});
alert("flag2");
var container2 = document.getElementById("loginBoxContainer").style.backgroundColor = "blue";
alert("flag3"+ (container1 === container2));