htButtons.js 697 B

12345678910111213141516171819202122232425262728
  1. (function ($)
  2. {
  3. $.fn.htButtons = function ()
  4. {
  5. return this.each(function ()
  6. {
  7. if (this.manager) return;
  8. var g = {};
  9. this.manager = true;
  10. g.button = $(this);
  11. if (!g.button.hasClass("ht-btn")) g.button.addClass("ht-btn");
  12. g.button.append('<div class="ht-btn-l"></div><div class="ht-btn-r"></div>');
  13. g.button.hover(function ()
  14. {
  15. $(this).addClass("ht-btn-over");
  16. }, function ()
  17. {
  18. $(this).removeClass("ht-btn-over");
  19. });
  20. });
  21. };
  22. })(jQuery);