tooltip always present

Asked

Viewed 55 times

1

I have the following code:

http://jsfiddle.net/56bv52us/

What I’m trying to do is the message keeps popping up, which means you don’t have to mouse over it to get the message out, it’s always there. It is possible to do this?

I’m using this toolkip: http://jqueryui.com/tooltip/

2 answers

1


I resolved so:

$(function() {
  $('input.age').mouseleave(function(e) {
    e.stopImmediatePropagation();
  }).tooltip({
    content: function() {
      return $(this).attr('title');
    }
  }).tooltip('open')
});

<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<input class="age" title="Hello <br/>My message">

0

Taken from jquery website

var tooltips = $( "[title]" ).tooltip({
      position: {
        my: "left top",
        at: "right+5 top-5"
      }
    });
      tooltips.tooltip( "open" ); 

jQuery tooltip Forms

  • How can I do that without using the button and always appear? I am trying to use but lose some formatting, namely the html I have in the message. thanks! @lazyFox

Browser other questions tagged

You are not signed in. Login or sign up in order to post.