lundi 28 août 2017

How to highlight a list-item in an unordered list when clicked?

We are creating a way to filter in our jobs portal.

           
                       <li >
                            All
                        </li>
                        <li active=true >
                            Intern
                        </li>
                        <li >
                            New Grads
                        </li>
                        <li >
                            Entry Level
                        </li>
                        <li >
                            Senior
                        </li>
            

When a user clicks a <li>, it will call the function filterWith which filters either/or (AKA exactly one filter is applied at any time). We want whichever filter is clicked to be highlighted a different color from the rest.

Implementing this has been very difficult because we want to do it in a way that doesn't use jQuerry (we have been having trouble with mixing jQuerry and Ember together). We might be able to do it just with Bootstrap to do it if we knew how to.




Aucun commentaire:

Enregistrer un commentaire