RoadFlow2.1 临时演示

roadui.button.js 694B

12345678910111213141516171819202122232425262728
  1. //按钮
  2. ; RoadUI.Button = function ()
  3. {
  4. var instance = this;
  5. this.init = function ($buttons)
  6. {
  7. if (!$buttons || $buttons.size() == 0)
  8. {
  9. return false;
  10. }
  11. $buttons.addClass("button1").bind("mouseover", function ()
  12. {
  13. $(this).removeClass().addClass("button2");
  14. }).bind("mouseout", function ()
  15. {
  16. $(this).removeClass().addClass("button1");
  17. });
  18. $buttons.each(function ()
  19. {
  20. if ($(this).prop("disabled"))
  21. {
  22. $(this).unbind("mouseout").unbind("mouseover").removeClass().addClass("buttondisabled");
  23. }
  24. });
  25. };
  26. }