I have a solution

by Ben Whittaker

(hi, long time lurker, etc etc)

You aren't wasting your time! The idea is good, it just needs some client-side magic.

I whipped up an html/javascript snippet you can add to the page in order to create a keyword search box. When you type in the box, it will search for entries that contain the specified keywords, and hide everything else. You can see this in action on a test copy of the codex page at http://benw.ca/twb_filter_index.html

In order to make this work:
- make the list of strips into an actual HTML list, where the whole list is enclosed in an ul tag and each element is inside an li tag
- give the list's ul tag the id "strip_index"
- Paste the contents of the following file where you want the search box: https://gist.githubusercontent.com/nebbishhacker/4ea7ba4d480fbe2d93bb448ce758548e/raw/f7a38533a805244f7fc84cb3c9948da1719effcb/twb_codex_filter_snippet.html

I hope this works for you! Let me know if you have any problems with the html.
Ben Whittaker

Posted on Sep 11, 2017, 5:15 PM

Respond to this message

Goto Forum Home


eXTReMe Tracker