Difference between revisions of "Set focus on question text in the top"
(New page: == Challenge == If the question text is to big or answer option is long then the respondent can not see the begining of the question text. == Solution == *In questionnaire template ed...) |
Cg huyphong (talk | contribs) |
||
(One intermediate revision by one other user not shown) | |||
Line 11: | Line 11: | ||
quest.init = function(){ | quest.init = function(){ | ||
− | + | $("input[name$='Q_LongQuestionText_new']").focus(); | |
− | + | //$("#page_question_text").scrollTop(0); -> applied for page question | |
− | + | this.onInit(); | |
} | } | ||
+ | </source> | ||
+ | ==Code sample== | ||
− | + | Open the qnaire "Js demo - some js samples" (Resource Id: 159684). View the Question "Q_LongQuestionText_new" |
Latest revision as of 09:21, 10 February 2012
Contents
Challenge
If the question text is to big or answer option is long then the respondent can not see the begining of the question text.
Solution
- In questionnaire template editor, choose the question you want edit and then go to the Properties - Edit question properties - Language dependent - Select javascript property
Code
quest.init = function(){
$("input[name$='Q_LongQuestionText_new']").focus();
//$("#page_question_text").scrollTop(0); -> applied for page question
this.onInit();
}
Code sample
Open the qnaire "Js demo - some js samples" (Resource Id: 159684). View the Question "Q_LongQuestionText_new"