我只想将Jquery、移动CSS和JS应用于一些有限的元素,而不适用于页面上的其他元素。知道我该怎么做吗。
我有一些Salesforce标准客户门户,其中包括一个包含Jquery、mobile和CSS的选项卡。
现在,当我打开Customer中的选项卡时,它将覆盖Salesforce标准样式。
谢谢
发布于 2014-01-17 11:48:03
取决于您正在使用的jQuery移动版本。
- Modify _Global Settings_ on `mobileinit`, by setting `ignoreContentEnabled` to _true_. However, this affects app performance negatively, as it slows down processing/initializing widgets/elements.
- Modify _page_ widget defaults on `mobileinit`, by setting a _.selector_ for `keepNative`. The _.selector_ could be a `<tag>`, an `#id` or a `.class`. - jQuery Mobile <= 1.3.x在创建页面时,input元素(具有#foo ID的元素和带有native类的元素)将保持原样。
演示
https://stackoverflow.com/questions/21184234
复制相似问题