Class selector selects all elements in the document which have a class of the given class-name.
Class selector syntax:
$('.class-name')
In following example,when the user click on the button, the color of the element with class="blue"
would be changed to blue
example:Select element by class name using jQuery
Try now