teamcrunk Posted February 1, 2013 Share Posted February 1, 2013 Is there a Way with Javascript to add Help bubbles over an input Box?For example when you you hover over an input for Name: _____ it would say like First Name????ThanksAn example is this https://edit.europe.yahoo.com/registration?.intl=ukWhen you go over the name field it says First name in a bubble. Ive been searching all over and can not find out how to do it. Link to comment Share on other sites More sharing options...
jeffman Posted February 1, 2013 Share Posted February 1, 2013 Use the title attribute instead. 1 Link to comment Share on other sites More sharing options...
Coyote Posted February 1, 2013 Share Posted February 1, 2013 The 'title' attribute is definitely the easiest way to achieve what you're after. It will trigger the basic 'tooltip' behaviour of the browser. example: Name: <input type="text" title="First Name"> Of course there are several ways to make that prettier, using javascript, but this works prefectly adequately. Link to comment Share on other sites More sharing options...
Cooley Posted February 3, 2013 Share Posted February 3, 2013 To enhance it you can download JQuery UI, reference it and then put the following script onto your document $(document).tooltip(); . You can then use the title attribute as above. Link to comment Share on other sites More sharing options...
ShadowMage Posted February 4, 2013 Share Posted February 4, 2013 Of course there are several ways to make that prettier, using javascript, but this works prefectly adequately.You don't even need JavaScript. You can use pure CSS to make tooltips like that. Then they look pretty and work even if JS is disabled. Link to comment Share on other sites More sharing options...
callumacrae Posted February 5, 2013 Share Posted February 5, 2013 You don't even need JavaScript. You can use pure CSS to make tooltips like that. Then they look pretty and work even if JS is disabled.I guess it depends on whether you're going for correctness, or ease of use and the ability to make your website look the same across all browsers. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now