Results 1 to 2 of 2

Thread: Adding a filter to my JQuery table

  1. #1
    Join Date
    Jan 2014

    Adding a filter to my JQuery table

    I'm trying to get the following filter to work for this table. I can get the filter input to display, but it doesn't affect the table data. I don't know if I'm adding the code in the wrong place, or if I've got the wrong code altogether... Please help!

    $("table").addTableFilter(); <-- Filter

    Spry.Utils.addLoadListener(function() {
    var onloadCallback = function(e){ load() }; // body
    Spry.$$("body").addEventListener('load', onloadCallback, false).forEach(function(n){ onloadCallback.call(n); });
    !function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+" ://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");

    var Contacts = {
    index: window.localStorage.getItem("Contacts:index"),
    $table: document.getElementById("contacts-table"),
    $form: document.getElementById("contacts-form"),
    $button_save: document.getElementById("contacts-op-save"),
    $button_discard: document.getElementById("contacts-op-discard"),

    init: function() {
    // initialize storage index
    if (!Contacts.index) {
    window.localStorage.setItem("Contacts:index", Contacts.index = 1);

  2. #2
    Join Date
    Mar 2007
    Please ask in the JQuery / Frameworks forum.
    --> JavaScript Frameworks like JQuery, Angular, Node <--
    ... and please remember to wrap code with forum BBCode tags:-

    [CODE]...[/CODE] [HTML]...[/HTML] [PHP]...[/PHP]

    If you can't think outside the box, you will be trapped forever with no escape...

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center