• Resolved philrichards

    (@philrichards)


    Hi there,

    I love HD quiz & it’s perfect for my needs.. There’s one thing I can’t get to work which is for the next button to change color when an answer has been selected.

    I’ve been trying to do it with javascript & it just won’t take.. In my case i’m trying to turn the next button from grey to green. I’ve seen this which shows it could be done with css. There’s some nice ideas on this page especially the toggle buttons.

    https://codersblock.com/blog/checkbox-trickery-with-css/

    I don’t mind having a crack at it myself & I will but I’d like to see something like that in the quiz with the button giving the indication to click next if possible?

    Thanks for your hard work on this!

    Phil

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Harmonic Design

    (@harmonic_design)

    Hi philrichards,
    this is an interesting idea, but would not be the easiest to code because not everyone is using pagination on each question like you are. So I’d need to code it so that the next button is “disabled” until all visible questions have been answered.

    I guess what you are looking for is a feature to “force answers” so that a user does not forget or refuse to select an answer.

    I’ll need some time to think about the best way to code this feature that is both cross-browser and device compatible and works regardless of what the individual quiz settings are. I think it’s a cool feature request though so I’ll try and update you on progress as it happens

    Plugin Author Harmonic Design

    (@harmonic_design)

    Also, if you want to take a crack at this yourself, here is where you’d want to look.

    First, you’ll want to add a custom class to all “next” .hdq_next_button buttons. Perhaps a class called .disabled. That class will have a style rule to make the opacity lower, so that it visually looks “greyed out”.

    The idea is that once we detect that an answer has been selected, we will remove the class disabled from the button, so that it goes from translucent to opaque.

    You can try and use the :visible jQuery selector to detect which question(s) are the visible questions, and then do a for loop to cycle through them all and make sure that each visible question has an answer selected. You’ll want to trigger this search each time an answer is selected.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Small feature Request’ is closed to new replies.