jquery or selector
$( "div, span, p.myClass" ).css( "border", "3px solid red" );
jquery or selector
$( "div, span, p.myClass" ).css( "border", "3px solid red" );
jquery multiple selectors
/*
If we want to apply same functionality and features to more than one selectors then we use multiple selector option.
I 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.
Kindly take a look in below example:
*/
Html:
<div>div</div>
<p class="myClass">p class="myClass"</p>
<p class="notMyClass">p class="notMyClass"</p>
<span>span</span>
Js:
<script>
$( "div, span, p.myClass" ).css( "border", "3px solid red" );
</script>
/*
I Hope it will help you.
Namaste
*/
how to select multiple jquery element at once
// To select multiple html element at once using jquery, follow the syntax below
$("tagName1, tagName2, tageName3")
// The above code will select "tagName1", "tagName2", tagName3
// To select multiple element using "class name" follow the syntax below
$(".className1, .className2, .className3, .className4")
// To select multiple element using "id name" follow the syntax below
$("#idName1, #idName2")
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us