Category Archives: JavaScript

Filtering with JavaScript’s onhashchange Event

I recently discovered a very neat way of using JavaScript to filter which records are shown on a page. Filtering with JavaScript’s onhashchange Event – Example¬†(opens in new window) For a long time I’ve been using links to trigger JavaScript … Continue reading

Posted in JavaScript, onhashchange | Comments Off on Filtering with JavaScript’s onhashchange Event

Checking a Checkbox inside a List Item by Clicking the Parent or Child

It’s quite common to see list items <li> or table rows <tr><td> which contain a checkbox <input type=”checkbox”/>. Rather than the user having to be very precise and click/touch on the checkbox, it’s often preferable, especially on mobile devices, to … Continue reading

Posted in click(), JavaScript, jQuery | Tagged , , , , , , , , , | 1 Comment

Highlighting Matching Text in Search Results with jQuery

Following on from a previous post Easy Search As You Type List Filtering with jQuery, I’ve added a new function/feature to this script – the ability to highlight the matching text in the search results. Here’s the pen: See the … Continue reading

Posted in filter(), jQuery, slice() | Tagged , , , , , , , , , , , | 1 Comment