Web Development Ninjas Question: Download Ninjas Web Developer PDF

Explain me how do you set an attribute using jQuery?

Tweet Share WhatsApp

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 PDF Read All 58 Ninjas Web Developer Questions
Previous QuestionNext Question
Explain me the difference between cookies, sessionStorage, and localStorage?Explain me what is $(document).ready() function? Why should you use it?