create rss feed with php | get current time stamp in php | display current date php
 


 

Reference to a DOM element using jQuery



How can you create a reference to a DOM element using jquery? In other words, what is the jquery equivalent of

document.frm.element_name

or

document.getElementById("element_id")

Someone could say:

$("#element_id")

Wrong, as this is a jquery object and not a DOM object. The right answer is:

$("#element_id").get(0)

Your comments are welcomed!

Εγγραφή!
Sign-up for our free email newsletter. Get updates when new tutorials and tips are published. You can unsubscribe anytime with a click.

Your comments are welcomed!

This site actively encourages commenting on any post. Comments are not pre-moderated, but this community does not tolerate direct or indirect attacks, name-calling or insults. Please, read terms of use and Comment Policy at privacy policy.

More tips