SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Jul 2010
    Location
    Redwood City, California
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How Did They Do This?

    I saw a nice little pop up window and I'm trying to figure out if it's from a library or something they coded themselves. It's a small help button that you click on to get a pop up window with which you can interact. Here's the code:

    Code:
    <script type="text/javascript">
           //<![CDATA[
           new Fly.HelpButton({display:'/help/bills-khakis-models',displayTop:24,displayLeft:-200});
           //]]>
    </script>
    Here's the link if that's not enough to go on: http://www.onthefly.com/product/bill...ll-pants/23090

    It's the question mark button to the right of 'model'. If it looks custom, are there any libraries that provide a similar function?

    Thanks,
    Curt

    P.S. If you look at the page, isn't that way too much code to download to the client?
    Last edited by gcortes; Aug 23, 2010 at 16:56. Reason: Added post script

  2. #2
    I meant that to happen silver trophybronze trophy Raffles's Avatar
    Join Date
    Sep 2005
    Location
    Tanzania
    Posts
    4,662
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It's a custom script made with Prototype. It would be fairly easy to do, as all it is really is an absolutely positioned DIV that is toggled on and off, with a bit of fading thrown in. jQuery would make this a piece of cake. At its simplest:

    Code javascript:
    $('.help').click(function() {
      $('#helpbox').toggle('slow');
    });

    If you look at the documentation, you'll see that you could also make the fadeout transition different.

    As for the code, it doesn't looks particularly more bloated than a lot of sites these days. What do you mean?

  3. #3
    SitePoint Member
    Join Date
    Jul 2010
    Location
    Redwood City, California
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Raffles View Post
    As for the code, it doesn't looks particularly more bloated than a lot of sites these days. What do you mean?
    Thanks for taking a look and the info.

    As for the code, there is a 652 line if, else, if, else if, etc. statement. Are download time concerns not what they used to be in these high bandwidth times?


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
  •