Community Groups are officially here!
We've released Groups, a new feature that enables us to connect community members of similar industries and interests in a shared, private space. You can check out all of the details here, including information about who can join, how to join, and what Groups are currently offered. Please leave your feedback through this Community Groups Feedback Survey.

Total slider hours in real time

AshRMIT
AshRMIT Community Member Qubie ✭
edited July 8 in Custom Code

Hello, hope you are well.

I have a slider question on a survey with 8 categories on it. I was hoping it would be possible to display on the page near the question the total number based on the individual numbers to each of the 8 categories. I understand I can do this with piped text: ${q://QID100/TotalSum} but this will only display on a page reload or next question. Is it possible to have this refresh every time the slider is adjusted?

Thanks in advance.

Answers

  • grahulp5
    grahulp5 IndiaCommunity Member Guru ✭✭

    Use the below code on click of the slider and update eq value for all the different categories;


    jQuery('.slider-container').eq(0).find('.BarContainer .trackHolderRel .track').attr("aria-valuenow")

  • AshRMIT
    AshRMIT Community Member Qubie ✭

    Thank you so much for responding. I am hopeless when it comes to Javascript sorry. I have this for the Javascript function for the question, but I'm unsure of what I'm doing wrong, or whether I need to input ID values or something.


    Qualtrics.SurveyEngine.addOnload(function()

    {

    this.questionclick = function(event,element){

    jQuery('.slider-container').eq(0).find('.BarContainer .trackHolderRel .track').attr("aria-valuenow")

    }


    });


    Thanks in advance.

  • grahulp5
    grahulp5 IndiaCommunity Member Guru ✭✭

    Find the slider's main class and then on the same class use "click()" function and then get the value.