javascript/jquery custom filters
So I don't have that much experience with js or jquery and I'm working with python as my main language and just have this as a subtask so I lack knowledge in this area. My task is the following:
I get some custom data from the backend, let's say:
<DataType(name, start_date, author, nr_operation)>
So those are the fields I have in the database. N开发者_Go百科ow at the moment, I display all the information from the database with their names in a html select input. Now the problem is that the data can grow quite large so I need to be able so filter this someway.
Now my ideea is to let the user have a "add filter" button, when this is pressed create another select input, this time with ('name', 'start_date', 'author', 'nr_operation') and one or two input fields where he could enter the data and then handle this in the backend accordingly and repopulate my first select.
If this works fine maybe I'll try adding the possibility to add more filter/remove old ones. Now I'm guessing this can all be done is JS or JQuery. But I am not in the mood to reinvent the wheel here and given my lack of experience in this area I want to check first if anything of the sort is already implemented.
So my question would be, are there any plugins that offer this/ some of this functionality?
EDIT: To make myself clearer, I don't need to do the filtering in JS, the role of those "filters" would be to pass by ajax a list of the type {"name": "John Doe", "start_date", "01.01.1991"}.
Regards, Bogdan
Your request is so specific I would doubt there's a plugin that would fit your need. JQuery makes this really easy to roll your own though. Look up on jquery.com, function likes .append(html) and .after(html) and .html(html). If you can write the HTML, it's only a little jquery to write to get the functionality you need.
精彩评论