javascript - jquery how to remove ui-state-focus - Stack Overflow

A use jquery and button used my style, but when i clicked on button style changed on ui-state-focus.I

A use jquery and button used my style, but when i clicked on button style changed on ui-state-focus. I try remove jquery style

$("button").mousedown(function () {
      $('button').removeClass("ui-state-focus");
});

but it not worked. How to remove jquery style?

A use jquery and button used my style, but when i clicked on button style changed on ui-state-focus. I try remove jquery style

$("button").mousedown(function () {
      $('button').removeClass("ui-state-focus");
});

but it not worked. How to remove jquery style?

Share Improve this question asked Mar 12, 2013 at 11:16 NarNar 5501 gold badge9 silver badges23 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 4

I add removeClass in focus and worked for me.

$("button").focus(function () {
    $(this).removeClass("ui-state-focus");
});

You should use $(this) instead of $('button')

$("button").mousedown(function () {
      $(this).removeClass("ui-state-focus");
});

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744756407a4591908.html

相关推荐

  • javascript - jquery how to remove ui-state-focus - Stack Overflow

    A use jquery and button used my style, but when i clicked on button style changed on ui-state-focus.I

    5小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信