- Posts: 43
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
move countdown
- marcomarenco
- Topic Author
- Offline
- Senior Member
Less
More
6 years 10 months ago - 6 years 10 months ago #153119
by marcomarenco
move countdown was created by marcomarenco
Hi,
i would to move the countdown near the question answer (short text question),
i try to use this code (like for my last topic: www.limesurvey.org/forum/can-i-do-this-w...e-next-button#153095 ):
form the original:
to this:
in question source:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('#question{QID} .form-group').append($('#LS_question{QID}_Timer'));
$('#LS_question{QID}_Timer').addClass('alert');
$('#LS_question{QID}_Timer').addClass('alert-warning');
});
</script>
or:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('#LS_question{QID}_Timer').appendTo($('.form-group'));
});
</script>
or:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('.form-group').append($('#LS_question{QID}_Timer'));
});
</script>
but nothing happens, please, do you have any ideas?
thanks,
Marco
i would to move the countdown near the question answer (short text question),
i try to use this code (like for my last topic: www.limesurvey.org/forum/can-i-do-this-w...e-next-button#153095 ):
form the original:
to this:
in question source:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('#question{QID} .form-group').append($('#LS_question{QID}_Timer'));
$('#LS_question{QID}_Timer').addClass('alert');
$('#LS_question{QID}_Timer').addClass('alert-warning');
});
</script>
or:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('#LS_question{QID}_Timer').appendTo($('.form-group'));
});
</script>
or:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
$('.form-group').append($('#LS_question{QID}_Timer'));
});
</script>
but nothing happens, please, do you have any ideas?
thanks,
Marco
Attachments:
Last edit: 6 years 10 months ago by marcomarenco.
The topic has been locked.
- marcomarenco
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 43
- Thank you received: 0
6 years 10 months ago #153120
by marcomarenco
Replied by marcomarenco on topic move countdown
hi,
solved in this way, putting the javascript code in group description:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
var Id = $('.alert.alert-warning').attr('id');
$('.form-group').append($('#'+Id));
$('#'+Id).css("width", 250);
$('#'+Id).css("width", 150);
$('#'+Id).css("position", "absolute");
$('#'+Id).css("left", "700px");
$('#'+Id).css("float", "right");
$('.form-group').append($('<br><br><br>'));
$('.form-group').append($('#movenextbtn, #movesubmitbtn'));
$('#movenextbtn, #movesubmitbtn').addClass('inserted-button');
$( ".form-group" ).append( "<p>Per proseguire premi il tasto <strong>INVIO</strong> o clicca sul tasto <strong>AVANTI</strong></p>" );
});
</script>
solved in this way, putting the javascript code in group description:
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
var Id = $('.alert.alert-warning').attr('id');
$('.form-group').append($('#'+Id));
$('#'+Id).css("width", 250);
$('#'+Id).css("width", 150);
$('#'+Id).css("position", "absolute");
$('#'+Id).css("left", "700px");
$('#'+Id).css("float", "right");
$('.form-group').append($('<br><br><br>'));
$('.form-group').append($('#movenextbtn, #movesubmitbtn'));
$('#movenextbtn, #movesubmitbtn').addClass('inserted-button');
$( ".form-group" ).append( "<p>Per proseguire premi il tasto <strong>INVIO</strong> o clicca sul tasto <strong>AVANTI</strong></p>" );
});
</script>
The topic has been locked.