SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2008
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Want to "spin" a button's icon onClick. Any ideas?

    Hi everyone!

    I'm about to launch a new site that features an info "drawer" that slides out. You can see it here:

    http://v2.biklopsdesign.com/work.html

    I love it but I have one little aesthetic tweak I'd like to make and can't seem to find a jQuery plugin that can do it. When the drawer is closed I'd like to have that little arrowhead point up, and when it is open I'd like the arrowhead to point down. Basically a "toggle" depending on the state of the drawer. Currently that little arrowhead icon is a BG image but I could easily just make it a regular <img> if that helps.

    Any ideas?
    tweeting: @biklops

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,815
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    The first thing you are going to need is either multiple images for each version or one image that contains all the versions that can be cropped to show just the one. Then you use JavaScript/jQuery to either swap the images or to change where the image is cropped.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  3. #3
    SitePoint Zealot
    Join Date
    Jul 2008
    Posts
    109
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've done that before! Ok I think I can figure it out. I'm just worried it could look a little "step-y". Recommend a particular plugin with it set to "toggle"?
    tweeting: @biklops


Bookmarks

Posting Permissions

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