customcontent.html 990 B

1234567891011121314151617181920212223242526272829303132
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Custom Tooltip Content - 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>Custom Tooltip Content</h2>
  14. <p>Access to each elements attribute to get the tooltip content.</p>
  15. <div style="margin:20px 0;"></div>
  16. <div class="easyui-panel">
  17. <div id="pg" data-options="total:114"></div>
  18. </div>
  19. <script>
  20. $(function(){
  21. $('#pg').pagination().find('a.l-btn').tooltip({
  22. content: function(){
  23. var cc = $(this).find('span.l-btn-icon').attr('class').split(' ');
  24. var icon = cc[1].split('-')[1];
  25. return icon + ' page';
  26. }
  27. });
  28. });
  29. </script>
  30. </body>
  31. </html>