Link to home
Start Free TrialLog in
Avatar of Alex Lord
Alex Lord

asked on

Can i select a specific class using id


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 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

Avatar of Chris Stanyon
Chris Stanyon
Flag of United Kingdom of Great Britain and Northern Ireland image


$("#newModalWindow .modal-body")

Open in new window

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

all element in id="newModalWindow" :
$("*", "#newModalWindow")
Avatar of Zakaria Acharki
Zakaria Acharki
Flag of Morocco image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Our suggestions work for you @Alex?