True visual analogue scales in Limesurvey?

More
3 years 1 week ago #156256 by de_huig
That's perfect! Thank you so much!

Please Log in to join the conversation.

More
1 month 1 week ago - 1 month 1 week ago #200198 by mopodendo
Sorry for bringing this up once more.
I tried tpartner's last JS solution on LS 3.17 but it doesn't seem to work. Is there a way to achieve a hiding of the tooltip and the slider handle with this version?

To specify: If I include the code, the slider is completely hidden and no answer can be given.
Last edit: 1 month 1 week ago by mopodendo.

Please Log in to join the conversation.

More
1 month 1 week ago #200204 by tpartner
There are several code snippets in this thread. Can you please explain exactly what you wish to achieve with screenshots/mock-ups and post the code that you tried?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Please Log in to join the conversation.

More
1 month 1 week ago #200207 by mopodendo
Sure!
Screenshot is the current state.
1. I would like the tooltip (black box displaying the input number) to disappear
2. Ideally, although not as inportant, the selection marker (circle) would only appear once the participant has clicked on the slider.
<script type="text/javascript" charset="utf-8">
	$(document).ready(function(){
		$('#question{QID} .question-item').hide();
 
		$('#question{QID} input[type="text"]').each(function(i) {
			$('#question{QID} input[type="text"]').on('slideEnabled', function(e) {
				var thisRow = $(this).closest('.question-item');
				$('.slider .tooltip', thisRow).addClass('hidden');
				$('.slider .slider-handle', thisRow).hide();
 
				$('.slider', thisRow).on('slideStop', function(e) {
					$('.slider-handle', thisRow).show();
				});
 
				$(thisRow).show();
			});
		});
	});
</script>

Thanks for your help!
Attachments:

Please Log in to join the conversation.

More
1 month 1 week ago - 1 month 1 week ago #200218 by Joffm
Hi,
only to hide the tooltip, this should be sufficient.
.slider .tooltip.top {
  display:none;
}



Volunteers are not paid.
Not because they are worthless, but because they are priceless
Attachments:
Last edit: 1 month 1 week ago by Joffm.
The following user(s) said Thank You: mopodendo

Please Log in to join the conversation.

More
1 month 1 week ago #200222 by tpartner
This script will remove the tooltips and hide the slider handle until the slider is manipulated in 3.x:

<script type="text/javascript" charset="utf-8">
 
	$(document).on('ready pjax:scriptcomplete',function(){
 
		// Identify this question
		var qID = {QID};
		var thisQuestion = $('#question'+qID);
 
		$('input:text', thisQuestion).on('slideEnabled',function(){ 
			var thisItem = $(this).closest('li');
			var thisCode = $(thisItem).attr('id').split('X'+qID)[1];
 
			// Remove the tooltips
			$('.tooltip', thisItem).remove();
 
			// Initially hide the slider handle
			if($('input:text[id^="answer"][id$="X'+qID+thisCode+'"]', thisItem).val() == '') {
				$('.slider-handle', thisItem).hide();
			}
 
			// Listener on slider
			$(this).on('slide slideStop', function(event) {
				// Show the slider handle
				$('.slider-handle', thisItem).show();
			});
		});
    });
</script>

Sample survey attached:

File Attachment:

File Name: limesurvey...9381.lss
File Size:24 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Attachments:
The following user(s) said Thank You: mopodendo

Please Log in to join the conversation.

More
1 month 1 week ago #200225 by mopodendo
Perfect, thanks a lot!

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now