k12onos
03-13-2012, 02:22 AM
Hi guys :)
I need a help here, I hope you don't mind :)
I am trying to implement this script below with a HTML form.
jQuery(document).ready(function($) {
$('#slideshow')
.cycle({
fx: 'scrollHorz',
speed: 1000,
next: '#slide_next',
prev: '#slide_prev',
timeout: 13000
});
});
I want to make it that each time the user choose a radio button answer, they will initiate href='#next' and the next slide will come in.
This is the code that I use now:
<input type="radio" name="question-1-answers" id="question-1-answers-B" value="B" onclick="location.href='#next'" />
<label for="question-1-answers-B">The answer is B</label>
But it doesn't work unless I change the id to id="slide_next" (obviously) AND it doesn't work when it has multiple [onclick="location.href='#next'"] in the same page.
I have to use the [id] tag for the <label> purpose, and at the same time I need to have multiple buttons with onclick="location.href='#next'" so that everytime user click any of the few radio buttons, it will move on to the next slide/question.
Is there any alternative for the below javascript?
next: '#slide_next',
prev: '#slide_prev',
One that don't need [id] tag and allow multiple links of href='#next' to work.
Thank you in advance, I would GREATLY appreciate your help :)
I need a help here, I hope you don't mind :)
I am trying to implement this script below with a HTML form.
jQuery(document).ready(function($) {
$('#slideshow')
.cycle({
fx: 'scrollHorz',
speed: 1000,
next: '#slide_next',
prev: '#slide_prev',
timeout: 13000
});
});
I want to make it that each time the user choose a radio button answer, they will initiate href='#next' and the next slide will come in.
This is the code that I use now:
<input type="radio" name="question-1-answers" id="question-1-answers-B" value="B" onclick="location.href='#next'" />
<label for="question-1-answers-B">The answer is B</label>
But it doesn't work unless I change the id to id="slide_next" (obviously) AND it doesn't work when it has multiple [onclick="location.href='#next'"] in the same page.
I have to use the [id] tag for the <label> purpose, and at the same time I need to have multiple buttons with onclick="location.href='#next'" so that everytime user click any of the few radio buttons, it will move on to the next slide/question.
Is there any alternative for the below javascript?
next: '#slide_next',
prev: '#slide_prev',
One that don't need [id] tag and allow multiple links of href='#next' to work.
Thank you in advance, I would GREATLY appreciate your help :)