Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jquery css change Re: jquery css change

#49217
Jeager
Member

Added a onhover javascrip to the link so it will start to preload the image before you click, however, I still would like to do it the first way, just dont know how.

Was using http://designm.ag/tutorials/jquery-display-switch/ as a reference however I dont really understand how its working. The jquery looks like its just switching the the link css to .swap, not everything else it does. I see where its saying to fade in the thumb_view, but not sure what the added css of swap is really doing besides moving the sprite. Anyone able to take the time to explain it would be amazing. Would love to change the css using transitions verse chaning the css the second way I had posted.

Edit: Slightly off, I just really noticed the ul.display. So typing mainly to myself to orginize thoughts, is it adding and removing the swap class for the sprite, then adding and removing the display class and switching it via fade transition to the thumb_view. I think thats where I messed up, I wasnt thinking the author was using the jquery for the sprite switch, and thats what was confusing me. I’ll test it when I get back home.