www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] toggleClass and background images

  1. #1
    Join Date
    Dec 2004
    Posts
    88

    resolved [RESOLVED] toggleClass and background images

    Hi.

    I have a button which selects a hidden input field when clicked. This part works fine. However, I'm using jQuery and toggleClass in order to switch class, icon and label of the button, and this doesn't work properly in IE7. The background image doesn't show when clicking the button (and it never comes back no matter the state of the button). I know the css3 stuff isn't supposed to work but it would be nice to display the background image.

    Everything works fine in IE8, IE9, FF and Chrome. See example: here.

    If this post needs to be moved to the jQuery category, let me know.

    Thanks.

  2. #2
    Join Date
    Aug 2012
    Posts
    13
    Instead of toggling the class, maybe you can try to set the background immediatly when clicking it, cuz i don't think IE7 checks the classes when changed without refresh..

  3. #3
    Join Date
    Dec 2004
    Posts
    88
    I ended up changing my button to an input type="submit" - that solved it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles