NeXTs / Jets.js

Native CSS search engine
https://jets.js.org
MIT License
2.8k stars 108 forks source link

nested items #5

Closed manlioma closed 9 years ago

manlioma commented 9 years ago

Hello, I have 20 accordion style Items, each one has 3 sub-items, and each one has minimum other 3 sub-sub-items.

Now I would to search 1 word inside all list, and if result is in 3° level, I need to show the dependance, like this:

1° level - items

Do you think is it possibile with your script ? Thank you very much

NeXTs commented 9 years ago

Hi have you tried to do it at jsfiddle? I guess plugin will hide 1st level items which does not match search phrase. But it definitely will not hide inappropriate items at 2nd level.

manlioma commented 9 years ago

Thank you, i will try soon, but do you suggest me to use an accordion or table or ul ?

NeXTs commented 9 years ago

For plugin there is no difference if it will be table or ul. I am not aware of your structure so I can not give you advice on this. Please add example at jsfiddle

manlioma commented 9 years ago

Thank you very much, this is the original scenario, with bootstrap Accordion. https://jsfiddle.net/gtzx0dhp/

I have to know if I have to write again all list

Manlio Massimetti +39 339 28 26 912 mmanlio@gmail.com

2015-09-23 11:24 GMT+02:00 Denis Lukov notifications@github.com:

For plugin there is no difference if it will be table or ul. I am not aware of your structure so I can not advice about this. Please add example at jsfiddle

— Reply to this email directly or view it on GitHub https://github.com/NeXTs/Jets.js/issues/5#issuecomment-142542391.

NeXTs commented 9 years ago

Sorry buddy. I spend some time for research and can say you that plugin is just not intended for this task. Of course you could use manualContentHandling function to fetch specific text from every accordion item and filter by this data.. but it would be really overhead effort. Also even if you hide inappropriate rows, CSS will not add required extra class "accordion-body collapse IN" to open appropriate accordeon items. Better use JS/jQuery :)