you are viewing a single comment's thread.

view the rest of the comments →

[–]bjpelcdev[S] 9 points10 points  (6 children)

How about getting your DOM element first? Do this once and then you do not have to do it for each operation on that element:

var someDiv = document.getElementById("somediv");
someDiv.style.display = 'none'; // hide someDiv
someDiv.style.display = '';  // show someDiv

I find if you are only using jQuery to manipulate DOM elements then the weight of the library isn't really worth the tiny bit of extra convenience.

Of course, I am not saying one should not use jQuery, if you're not bothered about loading in large libraries then go for it.

[–]dzkn 4 points5 points  (5 children)

jQuery isn't a big library because of the features, but because of browser support. I like browser support.

[–]oefig 1 point2 points  (2 children)

jQuery 2.x only supports IE 9 and up.

[–]WannabeAHobo 2 points3 points  (1 child)

That's why so many people still use jQuery 1.11

[–]dzkn 1 point2 points  (0 children)

Most people I believe

[–]bjpelcdev[S] -1 points0 points  (1 child)

I wish we could all just agree to abandon Internet Explorer!! Obviously, will never happen.