How to autocomplete a field depending on a list of checkboxes?

How to autocomplete a field depending on a list of checkboxes?

Hi guys!

I have a pure js code that allows to autocomplete a field depending on a checkboxes list, but this code doesn't work on IE < 9.


I want to make the same thing but using jQuery to avoid IE verions issues, I am a newbie, so I don't know exactly how to do it. I found a code but I don't know how to apply it on my DOM.

This is my code without jQuery, can any body here help me, I'm really LOST :(

Thank you in advance.