I have main div with an ID of mvrContentFormDiv. Inside there, there are 4 child div’s with IDs of reportFileURL, UploadReportDate, reportTitle & reportImageURL.
Each of these have a class of error. Right now I am removing that class individually using the following code, but would like to use removeClass from the parent DIV.
$("#reportFileURL").removeClass("error");
$("#uploadReportDate").removeClass("error");
$("#reportTitle").removeClass("error");
$("#reportImageURL").removeClass("error");
Can anyone explain how I can do this?
You could use the
children()method or child selector to select them from themvrContentFormDiv:or