I created a form to generate urlname and urllink. This form generate three element : 1- the span element (display urlname and in html urllink) 2- input hidden with urlname 3- input hidden with urllink.
$(document).on("click", ".url_remove", function () {
var refurllink = $(this).data("nburl");
var allclasssameurl = $('.' + refurllink); // <- return [] or s.fn.init length 0
//$(this).parent().closest('input[type=hidden]').find($('.' + refurllink)).remove();
$('input[type=hidden]').find(allclasssameurl).remove(); //doesn't work
$(this).parent().remove(); // works fine
}); // Delete link
Issue : the console display s.fn.init length 0 or [ ]
I don't know why I get this result. **I can't select the two inputs hidden closest of span. **