Web Development Ninjas Question:
Download Questions PDF

Explain me how do you set an attribute using jQuery?

Answer:

One more follow-up question of previous jQuery question, attr() method is overload like many other methods in JQuery. If you call attr() method with value e.g. attr(name, value), where name is the name of attribute and value is the new value.

Download Ninjas Web Developer Interview Questions And Answers PDF

Previous QuestionNext Question
Explain me the difference between cookies, sessionStorage, and localStorage?Explain me what is $(document).ready() function? Why should you use it?