Step By Step

2908, 2012

click() and dblclick()

By |Tags: |0 Comments

click() : Fire when mouse single click on the matched element. dblclick() : Fire when mouse double clicks on the matched element. Example : $('#singleClick').click(function(){ $('#singleClick').css("border", "1px solid red"); }); $('#doubleClick').dblclick(function(){ $('#doubleClick')..css("border", "1px solid blue");

2908, 2012

.add() Method

By |Tags: |0 Comments

.add() Add elements to the set of matched elements. HTML: <p>Hello</p><span>Hello Again</span> JQUERY: $("div").css("border", "2px solid red") .add("p") .css("background", "yellow"); This JQ will, Step : 1ย  find the div and apply the red to the

2908, 2012

addClass() and removeClass()

By |Tags: |0 Comments

Jquery .addClass() and .removeClass() used to add or remove CSS class dynamically in the Html element. For Example .addClass() $(โ€˜#p1โ€ฒ).addClass(โ€˜cssclass1โ€™); Add a โ€œcssclass1โ€™ css class to elements that contain id of โ€œp1โ€ณ. .removeClass() $(โ€˜#p1โ€ฒ).removeClass(โ€˜cssclass1โ€™); Remove

Go to Top