I have this:
var startDate = $(".startdate");
..which should select all elements with the class ‘startdate’.
I then try to do the following:
startDate(".nodate").hide();
…to hide any elements with the ‘nodate’ css class but this fails.
I’m just guessing at syntax here, what silly mistake am I making?
Edit: the ‘nodate’ elements are not at the same level as the ‘startdate’ elements. I should have posted an XHTML snippet.
There are couple of ways :
My preferred way is the first one, i saw the second one somewhere but didn’t used it. I can’t remember any other way yet. When i remember then i will update the post.