jQuery working with CSS(CSS Manipulation)
.css( ) This method get the CSS style property of the first matched element.. Example : Above code display the color code of the clicked ‘div’ . .height( ) This method get the height of the first matched element. Example : $(“p”).height()); // returns height of paragraph. $(window).height(); // returns height of browser viewport $(document).height(); […]
Form Element Selector
: button Selector This type of selector is used to select all input buttons plus all button elements. Example : $(“:button”).css({background:”yellow”, border:”3px red solid”}); It changes the color and border of all buttons. : checkbox Selector It selects all the element of type checkbox. Example : $(“form input: checkbox”).wrap(‘‘).parent().css({background:”yellow”, border:”3px red solid”}); It select all […]
jQuery content Filter
: contains() Selector It filters the elements which have the matched text. Example : It filters the div which have ‘Ankit’ as text and underline them. : empty Selector It filters the elements which are empty. Here empty means they don’t have children or text. Example : It filters all the ‘td’ element which don’t […]
jQuery Tips and Tricks you Must Memorize – Performance
Storing Data Use data method and avoid storing data inside the DOM. Some developers have a habit of storing data in the HTML attributes like ex.: HTML attributes is not meant to store data like that and the “alt” as a parameter name does not really make sense. The right alternative in most cases is […]
Sameera at LinkedIn
