I'm fairly new to javascript and I am having trouble figuring out the basics of how to change this code created by a former co-worker to fit what I need.
So, currently, the filter options pull the list of wordpress posts (designated as business listngs for my client's website) and allows you to filter by the category or tag within that listing/page. What I want to do is one of two things:
- Add a class name to the tag that fits the tag slug so I can add the appropriate image
- Reformat the code so it lists all tags within specific categories, rather than just the posts listed on that page. I think this will be more beneficial to users.
So, if you need a visual, my test website is located at http://ruskcountywi.com/trees/lodging/hotels-motels-resorts/ and http://ruskcountywi.com/trees/lodging/campgrounds/. You will see on the campgrounds page that the icons aren't matching up with the designated tag, this is what I'm trying to correct.
If you can also help me with the brief visibility of the error code on page load, that would be awesome.
Here's the lodgingFilter.js code:
[ 305 lines of code moderated, please provide link to pastebin.com link instead. ]