<bdo id='sMuII'></bdo><ul id='sMuII'></ul>

<i id='sMuII'><tr id='sMuII'><dt id='sMuII'><q id='sMuII'><span id='sMuII'><b id='sMuII'><form id='sMuII'><ins id='sMuII'></ins><ul id='sMuII'></ul><sub id='sMuII'></sub></form><legend id='sMuII'></legend><bdo id='sMuII'><pre id='sMuII'><center id='sMuII'></center></pre></bdo></b><th id='sMuII'></th></span></q></dt></tr></i><div id='sMuII'><tfoot id='sMuII'></tfoot><dl id='sMuII'><fieldset id='sMuII'></fieldset></dl></div>
    <legend id='sMuII'><style id='sMuII'><dir id='sMuII'><q id='sMuII'></q></dir></style></legend>

    <tfoot id='sMuII'></tfoot>
      1. <small id='sMuII'></small><noframes id='sMuII'>

      2. 呈现后以编程方式应用 jquery (mobile) css 类

        时间:2023-09-07
              <tbody id='iBU96'></tbody>

          • <legend id='iBU96'><style id='iBU96'><dir id='iBU96'><q id='iBU96'></q></dir></style></legend>

              <tfoot id='iBU96'></tfoot>

              <small id='iBU96'></small><noframes id='iBU96'>

              <i id='iBU96'><tr id='iBU96'><dt id='iBU96'><q id='iBU96'><span id='iBU96'><b id='iBU96'><form id='iBU96'><ins id='iBU96'></ins><ul id='iBU96'></ul><sub id='iBU96'></sub></form><legend id='iBU96'></legend><bdo id='iBU96'><pre id='iBU96'><center id='iBU96'></center></pre></bdo></b><th id='iBU96'></th></span></q></dt></tr></i><div id='iBU96'><tfoot id='iBU96'></tfoot><dl id='iBU96'><fieldset id='iBU96'></fieldset></dl></div>
              • <bdo id='iBU96'></bdo><ul id='iBU96'></ul>

                1. 本文介绍了呈现后以编程方式应用 jquery (mobile) css 类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  jquery mobile 将根据 data-<自动为页面上的元素应用 css 和一些 html/strong> 属性在页面加载时在它们上面.

                  jquery mobile will automatically apply css and some html for elements on the page based on what data- attributes are on them when the page loads.

                  我通过 ajax 调用拉入一些 html 内容,但它是在 jquery 移动 js 渲染发生后引入页面,因此没有获得许多 css 类.

                  I am pulling in some html content via an ajax call but it is introduced to the page after the jquery mobile js rendering has occurred, and therefore does not get the many css classes.

                  是否可以只调用 js 并要求渲染仅应用于我的新 html 内容?

                  Is it possible to just call out to the js and ask for the rendering to get applied to just my new html content?

                  之前

                  <div id="someDiv">
                      <ul data-role="listview" data-theme="b" data-inset="true">          
                              <li>
                                  <a href="#">
                                      <h3>
                                          Some title
                                      </h3>
                                      <p>
                                          Some text
                                      </p>
                                  </a>
                              </li>
                      </ul>
                  </div>
                  

                  之后

                  <div id="someDiv">
                      <ul data-role="listview" data-theme="b" data-inset="true" class="ui-listview ui-listview-inset ui-corner-all ui-shadow">          
                          <li data-theme="b" class="ui-btn ui-btn-icon-right ui-li ui-corner-top ui-corner-bottom ui-btn-up-b">
                              <div class="ui-btn-inner ui-li ui-corner-top ui-corner-bottom">
                                  <div class="ui-btn-text">
                                      <a href="#" class="ui-link-inherit">
                                          <h3 class="ui-li-heading">
                                              Some title
                                          </h3>
                                          <p class="ui-li-desc">
                                              Some text
                                          </p>
                                      </a>
                                  </div>
                                  <span class="ui-icon ui-icon-arrow-r"></span>
                              </div>
                          </li>
                      </ul>
                  </div>
                  

                  推荐答案

                  .page() 链接到您的 AJAX 调用

                  Chain the .page() to your AJAX call

                  例子:

                  var parm = '123';
                  
                  function loadPage(page){    
                      $.ajax({
                          url: 'page.php?parm='+value,
                          type: 'POST',
                          error : function (){ document.title='error'; },
                          success: function (data) {                  
                              $('#placeholder').html(data).page();
                          }
                      });
                      // Scrolls to the top of the page
                      $.mobile.silentScroll(0);
                  }
                  

                  HTML

                  <div name="placeholder" id="placeholder"><!-- This is the placeholder --></div>
                  

                  这篇关于呈现后以编程方式应用 jquery (mobile) css 类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  1. <i id='bBbz3'><tr id='bBbz3'><dt id='bBbz3'><q id='bBbz3'><span id='bBbz3'><b id='bBbz3'><form id='bBbz3'><ins id='bBbz3'></ins><ul id='bBbz3'></ul><sub id='bBbz3'></sub></form><legend id='bBbz3'></legend><bdo id='bBbz3'><pre id='bBbz3'><center id='bBbz3'></center></pre></bdo></b><th id='bBbz3'></th></span></q></dt></tr></i><div id='bBbz3'><tfoot id='bBbz3'></tfoot><dl id='bBbz3'><fieldset id='bBbz3'></fieldset></dl></div>

                        <tbody id='bBbz3'></tbody>
                    • <legend id='bBbz3'><style id='bBbz3'><dir id='bBbz3'><q id='bBbz3'></q></dir></style></legend>
                    • <tfoot id='bBbz3'></tfoot>

                      <small id='bBbz3'></small><noframes id='bBbz3'>

                          <bdo id='bBbz3'></bdo><ul id='bBbz3'></ul>