position.html 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Tooltip Position - jQuery EasyUI Demo</title>
  6. <link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
  7. <link rel="stylesheet" type="text/css" href="../../themes/icon.css">
  8. <link rel="stylesheet" type="text/css" href="../demo.css">
  9. <script type="text/javascript" src="../../jquery.min.js"></script>
  10. <script type="text/javascript" src="../../jquery.easyui.min.js"></script>
  11. </head>
  12. <body>
  13. <h2>Tooltip Position</h2>
  14. <p>Click the drop-down list below to change where the tooltip appears.</p>
  15. <div style="margin:20px 0;"></div>
  16. <span>Select position:</span>
  17. <select onchange="changePosition(this.value)">
  18. <option value="bottom">Bottom</option>
  19. <option value="top">Top</option>
  20. <option value="left">Left</option>
  21. <option value="right">Right</option>
  22. </select>
  23. <div style="padding:10px 200px">
  24. <div id="pp" class="easyui-panel easyui-tooltip" title="This is the tooltip message." style="width:100px;padding:5px">Hover Me</div>
  25. </div>
  26. <script type="text/javascript">
  27. function changePosition(pos){
  28. $('#pp').tooltip({
  29. position: pos
  30. });
  31. }
  32. </script>
  33. </body>
  34. </html>