I've got a problem that I can't figure out and was wondering if you good people could help out? I'm building a filter system that uses data options on the tags.
The nav elements add to an array when pressed and take that option out of the array when pressed again.
You may notice that the first set allows for combination and the date range doesn't. This is intentional. My problem lies with asking the script to show the elements in the #container that match the data tag when pressed - I want to show the li elements within #container that match the data-season="" or the data-date="".
in the seasons script this is my problematic piece of script....
if (typeof $("#container li").data('season' == showseason ) ) { $(this).show(); } I've tried various ways but I'm now just going in loops getting more confused with each attempt. HELP :)
typeofdoes, rather than just used it because it (presumably) 'sounded right'. Also, the equality operator inside of thedata()method means you're looking for adata-true/data-false(I think) variable, not assessing the returned attribute-string. Please: check the documentation when something doesn't work. Incidentally, when posting a problem, post a minimal demo, in order to get help.