How do you select element by ID in jQuery?
Answer / chaitanya
To select element use ID selector. We need to prefix the id with "#" (hash symbol). For example, to select element with ID "txtName", then syntax would be,
Hide Copy Code
$('#txtName')
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between bind() and live() function in jquery?
Will Events Are Also Copied On Clone In Jquery?
Is it possible to use other client side libraries like MooTools, Prototype along with jQuery?
Can you please explain the difference between event.preventdefault and "return false"? : jquery mobile
What's next on the hitlist with jquery ui?
What is the difference between map and grep function in jquery?
How we can select multiple elements in jquery?
How can you get the type of arguments passed to a function?
What is the starting point of code execution in jquery?
Can you write a jquery code to select all links inside the paragraph?
Which one is more efficient, document.getelementbyid( "idname") or $("#idname)?
Write a basic jquery code?