Hacker News new | ask | show | jobs
by xinsight 4760 days ago
Is there a way to deselect an option without reloading the page?

For example: Under "DOM Structure", once you select "DOM" or "String", you can never go back to seeing all the template options.

1 comments

It seems a little buggy. There seem to be several state combinations that cause it to lock up.
The "app" is just a bit of jquery that hides/shows divs based on their classes. It skips a refresh if the filter is empty ( to avoid creating an invalid jquery selector?), so if you set "View Partials" to "Yes" and then "No", nothing changes. Anyways, I just forked it and fixed it.

http://xinsight.github.io/template-chooser/

This is a simple little app, but it's a good example of how using the DOM as a model and a view (as most jquery apps do) doesn't create the most elegant code.