Class jquerymobile强制它不使用类
我有一个按钮,默认情况下,它会添加类ui btn corner all。我怎么能告诉它不要用那个,因为我只想要正方形的边,或者在我创建的那个里强制使用另一种样式Class jquerymobile强制它不使用类,class,jquery-mobile,Class,Jquery Mobile,我有一个按钮,默认情况下,它会添加类ui btn corner all。我怎么能告诉它不要用那个,因为我只想要正方形的边,或者在我创建的那个里强制使用另一种样式 <div data-role="content" data-theme="home"> <a href="index.html" data-role="button" data-icon="arrow-r">Content</a> </div> 您可以使用jQuery函数r
<div data-role="content" data-theme="home">
<a href="index.html" data-role="button" data-icon="arrow-r">Content</a>
</div>
您可以使用jQuery函数
removeClass('ui-btn-corner-all')
。没有其他方法可以满足您的需求。现场示例:
<div data-role="page" id="jqm-home" class="type-home">
<div data-role="content">
<a href="index.html" data-role="button" data-icon="arrow-r">Button w/ jQM Style</a>
<a href="index.html" data-role="button" data-icon="arrow-r" id="default-button-style-1">Button wo/ rounded corners jQM Style</a>
<a href="index.html" data-role="button" data-icon="arrow-r" id="default-button-style-2">Button wo/ icon jQM Style</a>
<a href="index.html" data-role="button" data-icon="arrow-r" id="default-button-style-3">Button wo/ icon/rounded corners jQM Style</a>
</div>
</div>
$('#default-button-style-1').removeClass('ui-btn-corner-all');
$('#default-button-style-2').removeClass('ui-btn-icon-left');
$('#default-button-style-3').removeClass('ui-btn-icon-left ui-btn-corner-all');