【问题标题】:Disable jQuery for some pages but keep the styles?为某些页面禁用 jQuery 但保留样式?
【发布时间】:2011-11-19 21:17:16
【问题描述】:

您好,我正在使用 jquery 制作移动网站,并且我想在某些页面上禁用 jQuery,但仍保留样式,即导航栏和所有内容,这可能吗?谢谢 p.s.我希望禁用它的原因是我可以使用锚:)

【问题讨论】:

  • 你可以使用锚 with jquery...
  • 不,你不能使用某些页面.html#part-of-page 它不会工作,我说的是外部锚

标签: jquery html navbar


【解决方案1】:

您正在使用 jQuery Mobile?如果我理解正确,您可以删除以下行:

<script type="text/javascript" src="http://code.jquery.com/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js">

并保持线路:

<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />

【讨论】:

  • 我试过了,但它禁用了我的 jQuery 导航栏。
  • 所以您希望禁用 jQuery,但仍希望 jQuery 工作?我认为你应该提出一个新问题,询问如何在使用 jQuery Mobile 时让锚点工作,这似乎是你真正的问题
  • 好的,抱歉,我想我的问题有点混乱。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-08-09
  • 2014-04-13
  • 2019-05-19
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多