javascript - Jquery, User Interaction: Hover links to highlight project combinations -


js fiddle (code)

this more of task have set myself learn arrays wondering if of can think of better cleaner way of doing task. want list of projects highlight when user hovers on links..

what want do

i have list of projects, on each project have worked on seo, develpment or design. on page there list of links say: design, development , seo. when hovering on link want of projects highlight..(combinations). projects might of done more 1 task on highlight more 1 link.....

how tried this

i thought make 2d array list of on offs projects. depending on link hovered on pulls out correct array, if see jsfiddle link, far go.

an example of similar

id design

thank anyhelp or advice

i hope explained clearly, i know rip code off example link, rather learn doing cut , paste.. - see others think , use jquery.

you can use 3 different styles each project , let : ".design", ".seo", ".development"

$("#link1").hover(   function ()   {     $(".design").each(function()     {         $(this).toggleclass("highlight");     });   },   function ()   {     $(".design").each(function()     {         $(this).toggleclass("highlight");     });   } ); 

explanation: when mouse hovered on link1 class .highlight toggled (added when mouseover,removed when mouseout) on elements use .design class. can similar way others 2 classes.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -