Andrew Johnson
Andrew Johnson

Reputation: 51

jQuery Datatables - match filtering words

I am using jQuery datatables and was hoping someone knew how to do this.

We have items in the database listed as 4x4 and 4wd. I would like it to also retrieve 4wd when I type in 4x4 and visa versa.

Thanks for your help in advance.

Andy

Upvotes: 2

Views: 147

Answers (1)

MaVRoSCy
MaVRoSCy

Reputation: 17839

One solution will be to have a hidden column (see bVisible) and add the alternate description in that column. (In your case, where the result is 4x4 then in the hidden column it would be 4wd and the other way around). So when you search you will get both results

Upvotes: 1

Related Questions