jquery:为什么内容会在下一行?

我正在使用jQuery v1.9.1编写的jquery测验插件 ,并在发行版中包含该版本。 当我尝试使用包含更高版本jQuery v1.11.1的当前jQuery Mobile时,测验存在以下问题:

测验问题没有排成一列

也就是说,答案不再排列在径向按钮旁边,就像我使用插件包含旧的jquery时那样,我不想这样做,因为它会导致页面中出现其他问题。

我能说的最好的标记代码是slickQuiz.js

// prepare a name for the answer inputs based on the question var selectAny = question.select_any ? question.select_any : false, forceCheckbox = question.force_checkbox ? question.force_checkbox : false, checkbox = (truths > 1 && !selectAny) || forceCheckbox, inputName = $element.attr('id') + '_question' + (count - 1), inputType = checkbox ? 'checkbox' : 'radio'; if( count == quizValues.questions.length ) { nextQuestionClass = nextQuestionClass + ' ' + lastQuestionClass; } for (i in answers) { if (answers.hasOwnProperty(i)) { answer = answers[i], optionId = inputName + '_' + i.toString(); // If question has >1 true answers and is not a select any, use checkboxes; otherwise, radios var input = ' '; var optionLabel = ''; var answerContent = $('
  • ') .append(input) .append(optionLabel); answerHTML.append(answerContent); } }

    你能否告诉我需要改变什么,所以每个答案选项,即“1”,“2”和“3”再次与径向按钮相邻?

    我在eclipse本地运行它。 这是我在FireFox中看到的内容:

     view-source:file:///C:/Users/Reto/eclipse-workspace/Site/WebContent/Test.html 
    Basic Popup

    This is a completely basic popup, no options set.

    Getting Started

    I'm the collapsible content without a theme.

    Quiz/Prep to continue on

    You Scored:

    Ranking:

    这是jQuery Mobile中包含的css改变了测验显示。 所以在分发slickQuiz.js文件中,我强制样式内联如下:

     var optionLabel = '';