I would like remove next element of a selected element. Here, I would like to remove “div” with css class “xqh_Mandatory_icon”.
<div class="xqh_Field">
<nobr>
<input name=
"ctl00$objContentPageTag$spzContactInformation$txt_sContactFirstName$txt" type="text"
size="25" id=
"ctl00_objContentPageTag_spzContactInformation_txt_sContactFirstName_txt" class=
"xqh_TextBox_Edit validate_txt_sContactFirstName" style=
"width:150px;margin-right:0px;" />
</nobr>
<div class="xqh_Mandatory_icon"></div>
</div>
I tried with this code
$('.xqh_TextBox_Edit.validate_txt_sContactFirstName').next().remove('xqh_Mandatory_icon');
but it didn’t work.
Set it to execute the code when the document is ready, also you were missing the period for the second class name. You had a space there instead.