pixeline wrote:
hi Michael,i just did : if ($(this).filter(".selected")) { return true; } else { and it worked !
That's not quite right. .filter() returns a jQuery object, which will always evaluate to true. To use it your way, you'd want to do if($(this).filter(".selected").length) which will return 0 if there are no elements, or a positive integer if there are.
Michael was correct in his example of $(this).is(".classname"), which will return a boolean value as required.
-- Best wishes, Dave Cardwell. http://davecardwell.co.uk/javascript/jquery/

