Using the jQuery attr() method attributes, an element can be set and added. This is also dynamically done in HTML elements.

Example

                                        

$("#bestinterviewquestion").click(function(){
   $("p").attr("padding","10px");
});

 

Suggest An Answer

No suggestions Available!