阅读背景:

jQuery Tooltip UI - x秒后触发工具提示

来源:互联网 

Here is what I have so far:

这是我到目前为止:

<!DOCTYPE HTML>
<html>
  <head>
    <title>Tooltip Testings</title>
    <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
    <style type="text/css"> 
      body { margin: 60px auto; } p { padding:0; margin: 4px auto; text-align: center; }
    </style>
    <link rel="stylesheet" href="/go.html?url=https://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.min.css" />
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
    <script src="https://code.jquery.com/ui/1.10.3/jquery-ui.min.js"></script>
    <script type="text/javascript">
    $(function() {
      $(document).tooltip({
        items: '.tooltip',
        show: 100,
        hide: 500,
        position: { my: 'center bottom', at: 'center top' },
        content: function( callback ) {
          var msgid = this.id.split('_')[1];
          $.ajax({
            type: 'post',
            url: '/tooltip.php',
            data:'i='+msgid,
            success: function( data ) { callback( data ); }
          });
        }
      });
    });
    </script>
  </head>
  <body>

    <p><a class="tooltip" id="i_283" href="/go.html?url=articles/programming-in-php.html">PHP Article</a></p>
    <p><a class="tooltip" id="i_567" href="/go.html?url=articles/programming-in-c.html">C+ Article</a></p>
    <p><a class="tooltip" id="i_741" href="/go.html?url=articles/programming-in-aspx.html">ASPX Article</a></p>
    <p><a class="tooltip" id="i_860" href="/go.html?url=articles/programming-in-java.html">Java Article</a></p>

  </body>
</html>
<!DOC



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: