0

我的工作我与jQuery Mobile的MVC项目,我创建了一个局部视图页面(_createanswer),并在页面内我有radiobutton不适用jquery移动样式?

<input type ="radio" value="1" name="select-answer" id="select-answer" /> Agree 
<input type ="radio" value="1" name="select-answer" id="select-answer" />Disagree 
<input type ="radio" value="2" name="select-answer" id="select-answer"/>Strongly Agree 
<input type ="radio" value="3" name="select-answer" id="select-answer"/>Strongly Disagree 

,并查看页面集成了该部分页面(详细信息)

在我的(deatails)

页我有

@{ 
    ViewBag.Title = "Details"; 
    Layout = "~/Views/Shared/_Layout.Mobile.cshtml"; 

} 

<div class="content_title "> 
    Question @Model.Id. @Model.Name 
</div> 
<div class="content_area"> 
    <div class="text"> 

     @using (Html.BeginForm("Create", "MayoAnswers")) 
     { 
      @Html.Partial("_CreateAnswer") 

      <div class="innerspacer"> 
       <input type="submit" value="Next" data-theme="d" /> 
      </div> 

     } 
    </div> 
</div> 

我的问题是所有这些单选按钮没有jQuery Mobile的造型,可以有人帮忙,请..

回答

1

我想你可能需要包装那些在对照组(或因此它显示在jQuery的文档),也标签和不同的ID-S不坏:

<fieldset data-role="controlgroup"> 
<input type ="radio" value="1" name="select-answer" id="select-answer-1" /> 
<label for="select-answer-1">Agree</label> 
<input type ="radio" value="1" name="select-answer" id="select-answer-2" /> 
<label for="select-answer-2">Disagree</label> 
<input type ="radio" value="2" name="select-answer" id="select-answer-3"/> 
<label for="select-answer-3"> Strongly Agree </label> 
<input type ="radio" value="3" name="select-answer" id="select-answer-4"/> 
<label for="select-answer-4"> Strongly Disagree </label> 
</fieldset> 
+0

UGG,忘记把