What i`m doing wrong in my code:
$.each($("input[value='"+id+"']"), function(index, value) {
alert($(this).val());
$("input[value='"+$(this).val()+"']").prevAll('.t-item:first').remove();
});
Html schema:
p.s im doing ‘each’ since i have the same html on other place on my page so i want to remove from both places
In this html example, my id is 249 or 293
You could try:
http://api.jquery.com/closest/
Get the first element that matches the selector, beginning at the current element and progressing up through the DOM tree.