jQuery class selector
Notes:
jQuery Class selector :
To select html element(s) by their class attribute value, we use jQuery class selector
Syntax of jQuery class selector:
$(“CSS class selector”).action(parameters);
To the jQuery function, if we pass the CSS class selector then it is called as jQuery class selector
I.e. a jQuery function with CSS class selector as a parameter is called as jQuery class selector
Ex:
$(".blueBorder").css( {"border":"2px solid blue"} );
It selects any HTML element whose class attribute value is set to “blueBorder” and applies the border of 2px solid blue
Note: in CSS dot(.) symbol indicates class selector.
Interview Questions: