0

I am a beginner of js and just begin to learn jQuery Mobile. I have created a listview page, I wrote the html code like this:

<li data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c"
                    class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-corner-top ui-btn-up-c">
      <div class="ui-btn-inner ui-li ui-corner-top">
        <div class="ui-btn-text">
         <a href="#" class="ui-link-inherit">Chuan</a>
        </div>
        <span class="ui-icon ui-icon-arrow-r ui-icon-shadow"></span>
      </div>
</li>

and when I open this html in Chrome, the code begin to look like this:

<li data-iconshadow="true" data-wrapperels="div" data-icon="arrow-r" data-iconpos="right" data-theme="c"
                class="ui-btn ui-btn-icon-right ui-li-has-arrow ui-li ui-corner-top ui-li-static ui-body-c ui-btn-up-c">
  <div class="ui-btn-inner ui-li ui-li-static ui-body-c ui-corner-top">
    <div class="ui-btn-text">
     <a href="#" class="ui-link-inherit">Chuan</a>
    </div>
    <span class="ui-icon ui-icon-arrow-r ui-icon-shadow"></span>
  </div>
</li>

You could see, there are "ui-li-static" and "ui-body-c" show up, and it makes my table cell very fat. Could anyone tell me how could these 2 attributes be added and how I could remove it? Thanks a lot.

4

1 回答 1

4

在 ready 函数中,您可以删除这个意外的类。

$('#your_page_or_pageRole_id').bind('pageinit', function() {
                $("#li_id").removeClass("ui-li-static");                
            });
于 2012-12-13T12:07:05.557 回答