PDA

View Full Version : togglescript used on radio input type


dazzclub
08-11-2010, 10:33 AM
Hi there,

I'm using a toggle script on radio buttons. All works well in browsers apart from IE...any of them.

The problem is when i check the radio button the function is fired but the radio button isn't checked, but I have to click twice for it to look checked, you know for the green circle to appear.

Here's the url http://www.tmchallcrest.com/survey/new/page3.php

Here is the jquery code im using...

$(".slick-show").ready(function() {
// hides the slickbox as soon as the DOM is ready
// (a little sooner than page load)
$('#slickbox').hide();
// shows the slickbox on clicking the noted link
$('.slick-show').change(function() {
$('#slickbox').show('slow');
return false;
});
// hides the slickbox on clicking the noted link
$('.slick-hide').change(function() {
$('#slickbox').hide('fast');
return false;
});
// toggles the slickbox on clicking the noted link
$('.slick-toggle').change(function() {
$('#slickbox').toggle(400);
return false;
});
});


and here is the html code

<input type="radio" name="placing_order" value="placing order very poor" class="slick-show" />Very Poor
<input type="radio" name="placing_order" value="placing order poor" class="slick-show" /> Poor
<input type="radio" name="placing_order" value="placing order average" class="slick-show" /> Average
<input type="radio" name="placing_order" value="placing order very good" class="slick-hide" /> Very Good
<input type="radio" name="placing_order" value="placing order excellent" class="slick-hide" /> Excellent


<div id="slickbox" class="maincontainer">
<label for="response_time_comments">Additonal comments</label>
<textarea name="response_time_comments" rows="2" cols="90" id="response_time_comments"></textarea></div>


If anyone can point me in the right direction, I'll be so grateful! :)

Thanks