jQuery if and logic

Posted by danit on Stack Overflow See other posts from Stack Overflow or by danit
Published on 2010-03-29T14:47:49Z Indexed on 2010/03/29 14:53 UTC
Read the original article Hit count: 120

Filed under:

I have a simple jQuery toolbar, the basic functionality is:

  1. Hover: Background change to defined value & add .active class
  2. OnClick: Move the icon down 4px, and change background of the toolbar to that of the element

What I would like to do move the icon down 4px when it has the class 'active' applied, however also remove the onclick event?

Somehow I need an 'IF' statement in my jQuery for the Onclick event.

© Stack Overflow or respective owner

Related posts about jQuery