SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard donboe's Avatar
    Join Date
    Jun 2010
    Location
    Netherlands
    Posts
    2,162
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    jQuery/Javascript one time event

    On a page I'm working on I have a 50% transparant mask that has as property display: none. I furthermore have 4 buttons on that page. I would like the mask to fade in after one of those buttons is clicked, but it should only happens one time. How can I do that?
    “Good artists copy, great artists steal” (Pablo Picasso - 1934)

  2. #2
    SitePoint Wizard
    Join Date
    Feb 2007
    Location
    Southern California
    Posts
    1,388
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Try CSS Animations on the colors:
    http://www.w3schools.com/css/css3_animations.asp
    Steve Husting

  3. #3
    Grüße aus'm Pott gold trophysilver trophybronze trophy
    Pullo's Avatar
    Join Date
    Jun 2007
    Location
    Germany
    Posts
    6,055
    Mentioned
    219 Post(s)
    Tagged
    12 Thread(s)
    jQuery has a method (aptly named .one()), which is executed once per element per event type.
    Maybe this will help?
    http://api.jquery.com/one/


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
  •