www.webdeveloper.com
Results 1 to 2 of 2

Thread: Adding a filter to my JQuery table

  1. #1
    Join Date
    Jan 2014
    Posts
    7

    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
    Location
    localhost
    Posts
    2,348
    Please ask in the JQuery / Frameworks forum.
    Yes, I know I'm about as subtle as being hit by a bus..(\\.\ Aug08)
    Yep... I say it like I see it, even if it is like a baseball bat in the nutz... (\\.\ Aug08)
    I want to leave this world the same way I came into it, Screaming, Incontinent & No memory!
    I laughed that hard I burst my colostomy bag... (\\.\ May03)
    Life for some is like a car accident... Mine is like a motorway pile up...

    Problems with Vista? :: Getting Cryptic wid it. :: The 'C' word! :: Whois?

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



Recent Articles