Guest User

Untitled

a guest
Jul 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. $('.selector').qtip({
  2. content: {
  3. text: function(api) {
  4. // Retrieve content from custom attribute of the $('.selector') elements.
  5. return $(this).attr('qtip-content');
  6. }
  7. },
  8. title: {
  9. text: function(api) {
  10. // Retrieve content from ALT attribute of the $('.selector') element
  11. return $(this).attr('alt');
  12. }
  13. },
  14. style: {
  15. classes: 'ui-tooltip-dark ui-tooltip-shadow';
  16. }
  17. });
  18.  
  19. <script type="text/javascript" class="example">
  20. $(document).ready(function()
  21. {
  22. $('.selector').qtip({
  23. content: {
  24. text: function(api) {
  25. // Retrieve content from custom attribute of the $('.selector') elements.
  26. return $(this).attr('qtip-content');
  27. }
  28. },
  29. title: {
  30. text: function(api) {
  31. // Retrieve content from ALT attribute of the $('.selector') element
  32. return $(this).attr('alt');
  33. }
  34. },
  35. style: {
  36. classes: 'ui-tooltip-dark ui-tooltip-shadow';
  37. }
  38. });
  39. });
  40. </script>
  41.  
  42. $('.selector').qtip({
  43. content: {
  44. text: function(api) {
  45. // Retrieve content from custom attribute of the $('.selector') elements.
  46. return $(this).attr('qtip-content');
  47. }
  48. },
  49. title: {
  50. text: function(api) {
  51. // Retrieve content from ALT attribute of the $('.selector') element
  52. return $(this).attr('alt');
  53. }
  54. },
  55. style: {
  56. classes: 'ui-tooltip-dark ui-tooltip-shadow';
  57. }
  58. });
  59.  
  60. $(document).ready(function()
  61. {
  62. $('.selector').qtip({
  63. content: {
  64. text: function(api) {
  65. // Retrieve content from custom attribute of the $('.selector') elements.
  66. return $(this).attr('qtip-content');
  67. },
  68. title: {
  69. text: function(api) {
  70. // Retrieve content from ALT attribute of the $('.selector') element
  71. return $(this).attr('alt');
  72. }
  73. }
  74. },
  75. style: {
  76. classes: 'ui-tooltip-dark ui-tooltip-shadow'
  77. }
  78. });
  79. });
Add Comment
Please, Sign In to add comment