2014-06-10 69 views
-1

Snapshot of the two radio buttons used單選按鈕重疊Coressponding文本

重疊他們的文本值的單選按鈕。也沒有采取整個屏幕,我試圖控制組asd以及。這有什麼問題? 我使用jquery的-1.10.min.jsjQuery的移動1.4.0.min.js和下面是代碼段

<div data-role="content"> 
    <form> 
     <div class="ui-grid-b "> 
      <div class="ui-block-a"> 
       <span> 
        <input type="radio" name="income" value="Monthly">Monthly</input> 
       </span> 
      </div> 
      <div class="ui-block-b"> 
       <span> 
        <input type="radio" name="income" value="Annually">Annually</input> 
       </span> 
      </div> 
     </div> 
    </form> 
</div> 
+1

請添加您的提琴 – Sid

+0

和CSS爲好。 –

回答

1

我取代侑代碼與下面的代碼和它的工作很好。而你錯位的主要原因是因爲jquery移動內聯樣式。在jqm中,添加一個帶有type =「radio」屬性和相應標籤的輸入,並將標籤的for屬性設置爲匹配輸入,因此它們在語義上相關聯。

<div class="ui-grid-b "> 
      <div class="ui-block-a"> 
       <input type="radio" name="income" value="Monthly" id="radio-choice-2"/> 
       <label for="radio-choice-2">Monthly</label> 
      </div> 

演示:http://plnkr.co/edit/beYWdwSmtzYCaRS4ibYK?p=preview

我希望你覺得它有用