I have a drop down box next to html link tag element, the link element is as below:
<a href="#" class="delete" onclick="remove(this)"> Delete</a>
It has an onclick attribute set to the javascript function below:
`function remove(obj) {
$(obj).prev('select[name=estateDropDownList]').remove();
$(obj).remove();
}`
Now it removes the link fine, but it won't remove the PREVIOUS dropdownbox, this dropdown box has a name "estateDropDownList" and I just want it to remove only THAT dropdown box using prev() in JQuery, any ideas as to why it only removes the link and not the dropdown box?