1/*
2If we want to apply same functionality and features to more than one selectors then we use multiple selector option.
3I think we can say this feature is used like reusability. write a jquery function and just add multiple selectors in which we want same features.
4
5
6Kindly take a look in below example:
7*/
8Html:
9<div>div</div>
10<p class="myClass">p class="myClass"</p>
11<p class="notMyClass">p class="notMyClass"</p>
12<span>span</span>
13
14Js:
15<script>
16$( "div, span, p.myClass" ).css( "border", "3px solid red" );
17</script>
18
19/*
20I Hope it will help you.
21Namaste
22*/
1// To select multiple html element at once using jquery, follow the syntax below
2$("tagName1, tagName2, tageName3")
3// The above code will select "tagName1", "tagName2", tagName3
4
5
6// To select multiple element using "class name" follow the syntax below
7$(".className1, .className2, .className3, .className4")
8
9// To select multiple element using "id name" follow the syntax below
10$("#idName1, #idName2")