Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17
  1. #11
    Join Date
    May 2006
    Location
    Hull
    Posts
    7,701
    Tokens
    2,430
    Habbo
    Moh

    Latest Awards:

    Default

    Quote Originally Posted by Apolva View Post
    You sure that's even a tooltip? Looks to me like a span tag on the same line as the text box.
    I think it could still be classed as a tooltip

  2. #12
    Join Date
    Sep 2009
    Location
    Hull
    Posts
    827
    Tokens
    0

    Latest Awards:

    Default

    Im still looking for some help? pls?

    Lew.
    Im not here to be loved, I love to be hated :-}


  3. #13
    Join Date
    Apr 2010
    Location
    Newcastle
    Posts
    655
    Tokens
    50

    Default

    Here's a quick example I wrote up (untested, may not work):

    Code:
    <!-- Style + jQuery include -->
    <head><style>.tip{border:1px solid #555;background:#EEE;display:none;}</style></head>
    <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script>
    
    <!-- Your form -->
    <form>
    <table>
    <tr><td>Username</td><td><input type='text' id='username' name='username' /></td><td><span id='username_tip' class='tip'>Type your name</span></td></tr>
    <tr><td>Password</td><td><input type='text' id='password' name='password' /></td><td><span id='password_tip' class='tip'>Type your password</span></td></tr>
    <tr><td></td><td><input type='submit' value='Log in' /></td></tr>
    </table>
    </form>
    
    <!-- Tooltip script -->
    <script>
    $('input:text').focus(function(){
         $('#'+$(this).attr('id')+'_tip').fadeIn();
    }).blur(function(){
         $('#'+$(this).attr('id')+'_tip').fadeOut();
    });
    </script>
    Last edited by Apolva; 12-06-2010 at 12:09 PM.

  4. #14
    Join Date
    Nov 2007
    Posts
    1,253
    Tokens
    150

    Latest Awards:

    Default

    Would indentation kill you Apolva? Really? Arghhh messy code is messy.

  5. #15
    Join Date
    Sep 2009
    Location
    Hull
    Posts
    827
    Tokens
    0

    Latest Awards:

    Default

    Indeed, im rubbish with js, could someone fix the above code pls lol, this makes me sounds really nooby! ;/

    Lew.
    Im not here to be loved, I love to be hated :-}


  6. #16
    Join Date
    Apr 2010
    Location
    Newcastle
    Posts
    655
    Tokens
    50

    Default

    It works.

    When you focus on any text input (NOT textarea), it will try to find another element with the same ID but with _tip after, eg. "originalID_tip", and will show/hide it.

    So focusing on
    Code:
    <input type='text' id='rofl' />
    will show
    Code:
    <span id='rofl_tip'>hi</span>
    using CSS. (it then hide it when you unfocus on the input)


    Just open it in your browser and mess around with the code a bit, it's quite easy to understand
    Last edited by Apolva; 12-06-2010 at 04:26 PM.

  7. #17

    Default

    This is exactly what you need. http://www.nickstakenburg.com/projects/prototip/
    If you need a hand implementing that, please PM me. I was just playing around with it on my test server and it works really well
    "hope is for sissies."
    - quote by Greg House
    pew pew pew

Page 2 of 2 FirstFirst 12

Posting Permissions

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