Apply smart filter with jquery
Apply smart filter with jquery
Hi, i need to apply a smart filter in bFilter input text field after a page load, base on a variable from url.
For example if I load this URL: www.test.com/index.php?filter=lab
I'd like to load entire table, then a script retrieve the value from url LAB and i'd like to write it inside bFilter input text, and trigger a event change to tell datatable filter result by string inserted. Is it possible?
Ok i've found this:
"search": {
"search": "LAB"
}
but it doesn't work if stateSave: true
This question has an accepted answers - jump to answer
Answers
My fiddle example here of a working solution:
http://jsfiddle.net/bbLjzspf/5616/
But my datatables appears inside a modal, and with a modal it doesn't work
solved