JQuery Programmer Question:
Download Questions PDF

How to set attributes of an element using jQuery?

JQuery Programmer Interview Question
JQuery Programmer Interview Question

Answer:

The attr(name, value) method can be used to set the named attribute onto all elements in the wrapped set using the passed value.

Download JQuery Programmer Interview Questions And Answers PDF

Previous QuestionNext Question
What is the advantage of using protocol less URL while referencing jQuery from CDNs?Is there any difference between body onload() and document.ready() function?