6 ms·
Can you direct us to some JavaScript that does this? This style of implementation is used by Dan Cedarholm and Jason Santa Maria. I think they would confirm it'
by hellyeahdude 18y ago
Can you direct us to some JavaScript that does this? This style of implementation is used by Dan Cedarholm and Jason Santa Maria. I think they would confirm it's best used in CSS. Haha
- noblethrasher 18y agoIt's trivially implemented in something like Jquery. Just give related elements the same class name. $('.someClass-xx') .mouseover(function () { $('.someClass-xx').each(function () {/* Do Stuff */}) }) .mouseout(function () { $('.someClass-xx').each(function () {/* Do Stuff */}) }) I only say it's better to implement in js because css forces you to tie behavior to markup in this case. Good implementation separates content/markup (html), presentation (css), and behavior (js).
- hellyeahdude 18y agoWow thats great! Thanks for that! Great code!