JQuery

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

2808, 2012

JQuery Selector

By |Tags: |0 Comments

JQUERY SELECTORS : 1) selecting a particular element having a specific class $(".class1").css("border", "1px solid red"); 2) select all elements of the page $("*").css("border", "1px solid red"); 3) select an element that having a particular

Go to Top