Okay, start out saying this is hard to explain with words only.
So i have setup a example here: http://jsfiddle.net/AFhvS/2/
I have a code in PHP, that show() the span element with X .sletindtastningfelt if it’s filled.
In the jsfiddle, it’s placed at the bottom in the js field.
jQuery(document).ready(function() {
$('#smeal-1-1').show();
$('#smeal-1-1').addClass("upstartRemoveClass");
$('#smeal-1-2').show();
$('#smeal-1-2').addClass("upstartRemoveClass");
});
Ok so it appears X infront of the first two input fields now.
What it does now is that when you click on one of the 4 tr (input fields), it hides the other X’s and keeps the one infront of the field. This is caused by the .end().siblings().find('.sletindtastningfelt').hide();
I wish to change this procedure if it has the class “upstartRemoveClass”. So if it has the class upstartRemoveClass it should not hide, like the rest, when you click on a tr (input field)
How about using
not?Like this:
Does that give you the result you’re looking for?