我需要我的链接看起来像链接而不是按钮。 我试过使用 removeClass 来删除
class="ui-button ui-widget ui-state-default ui-corner-all ui-button-text-only ui-state-hover"
和 removeAttr 删除
role="button"
但两者都不起作用。我应该如何防止这些类附加或只是简单地使我的链接看起来像链接?
最佳答案
来自 jQuery UI 按钮的 API 页面 (http://api.jqueryui.com/button/#method-destroy):
$( ".selector" ).button( "destroy" );
Removes the button functionality completely. This will return the element back to its pre-init state.
关于javascript - 防止链接看起来像按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24307739/