【问题标题】:Using backbone template changes the jQuery class使用主干模板更改 jQuery 类
【发布时间】:2015-12-23 00:12:05
【问题描述】:

当我为基于 jQuery 的页面使用主干(来自 parse.com)时,添加模板会一起更改外观(下面代码的第一行)

<script type="text/template" id="login-template">
  <header id="header"></header>
  <div class="login">
    <form class="login-form">
      <br>
      <div class="error" style="display:none"></div>
      <input type="text" id="login-username" placeholder="Your email" />
      <input type="password" id="login-password" placeholder="Password" />
      <button>Log In</button>
    </form>
    <form class="signup-form">
      <br>
      <div class="error" style="display:none"></div>
      <input type="text" id="signup-username" placeholder="Your email" />
      <input type="password" id="signup-password" placeholder="Create a Password" />
      <button>Sign Up</button>
    </form>
  </div>
</script>

没有上面第一行代码的样子

上面第一行代码的样子

【问题讨论】:

  • 那么你的主干代码在哪里?显示该页面的主干视图

标签: jquery jquery-mobile backbone.js parse-platform


【解决方案1】:

似乎在我制作了主干模板之后,我可以应用正确的类来使用 jQuery CSS 类,如下所示。你只需要申请课程。

 <button class="ui-btn ui-corner-all ui-shadow">Login</button>

而不是说使用

<button>Sign Up</button>

查看登录按钮如何改变外观,同时仍在主干模板中工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-01-16
    • 2012-06-16
    • 2013-11-18
    相关资源
    最近更新 更多