javascript - Using jQuery in place of document.getElement -


i use

$("#fooid") 

in place of

document.getelementbyid("fooid") 

because i'm getting id with # in front of it. while can remove enough, there fair amount of intermixing between when i'm using jquery selector , when i'm using native dom calls. in particular being called inside chart draw, seems expect native dom object back. giving extended jquery object makes choke , turn purple.

is there way can jquery "play nice" , pretend give, or return instead, native object?

you can use get method dom object:

$("#fooid").get(0); 

or bit shorter version:

$("#fooid")[0]; 

Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -