English 中文(简体)
如何让 DOM 元素不受 Jquery Mobile 自动设置 UI 课程的限制?
原标题:How to make an DOM element be free of Jquery Mobile auto setting UI classes?

也许我的问题有点混淆 让我澄清一下

我使用Jquery Mobile, 我想让它屏幕转换等等, 但我不希望所有的UI样式 自动应用到我的元素上。

我目前的问题是 我的链接中应用的“ 坚固的 ui- link < / strong” 。 其它的“ 坚固的 < ui- link < / strong >, 目前并不困扰我 。

我希望以“友好的方式”避免这一问题(不重写许多 CSS 或删除它们)。

有没有办法让一个元素 免受这些自动造型的影响?

我写的代码是:

<div class="page" id="home" data-role="page">
   <a class="bt" href="#page2">Page Two</a>
</div>

Jquery 移动生成代码

<div id="home" class="page ui-page ui-body-c ui-page-active" data-role="page" data-url="home" tabindex="0" style="min-height: 361px;">
   <a class="bt ui-link" href="#page2">Page Two</a>
</div>

谢谢!

最佳回答

找到它了,希望它能帮助有同样问题的人

在元素中仅应用 data-pole="none"

防止窗体元素自动初始化

If you d prefer that a particular form control be left untouched by jQuery Mobile, simply give that element the attribute data-role="none". For example:

<label for="foo">
<select name="foo" id="foo"  data-role="none">
    <option value="a" >A</option>
    <option value="b" >B</option>
    <option value="c" >C</option>
</select>

http://jquerymobile.com/demos/1.0b2/#/demos/1.0b2/docs/forms/docs-forms.html

问题回答
$(".ui-link").removeClass("ui-link");

这应该能从所有拥有该类的人中除去:-)





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签