Avatar of Alex Lord
Alex Lord
 asked on

Can i select a specific class using id

$(".modal-body").html(response.data);

Open in new window


am i able to get this class by using i Id to isolate it from other classes.



<div class="modal fade show" id="newModalWindow" tabindex="-1" role="dialog" aria-labelledby="newModalTitle" style="padding-right: 15px; display: block;"><div class="modal-dialog modal-dialog-centered modal-sm" role="document"><div class="modal-content"><div class="modal-header"><h5 class="modal-title" id="newModalTitle">Edit Note</h5><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button></div><div class="modal-body" style="padding: 1rem;"><form id="update-note-form" class="form-horizontal">
							<div class="form-group">
							<label class="col-md-12 control-label" for="textarea">Note</label>
							<div class="col-md-12">                     
								<textarea class="form-control" form="update-note-form" id="TEXT" name="TEXT">edit deal note</textarea>
								<input id="noteID" name="noteID" type="hidden" value="">
								<input id="subaction" name="subaction" type="hidden" value="update-note">
							</div>
							</div>			
						</form>
							</div><div class="modal-footer"><button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button><button id="update-Note" type="button" class="btn btn-success">Save</button></div></div></div></div>

Open in new window

jQueryHTML

Avatar of undefined
Last Comment
Zakaria Acharki

8/22/2022 - Mon
Chris Stanyon

Sure:

$("#newModalWindow .modal-body")

Open in new window

leakim971

I like this notation too :
$(".modal-body", "#newModalWindow")

all element in id="newModalWindow" :
$("*", "#newModalWindow")
ASKER CERTIFIED SOLUTION
Zakaria Acharki

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Zakaria Acharki

Our suggestions work for you @Alex?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23