Wednesday, 11 September 2013

jQuery show() / hide() function for without button

jQuery show() / hide() function for without button

I'm trying to show the if that option is selected from the list of
different options by klicking on of the . What I achived so far is that by
selecting any of the options all of the hide.
How can I correct this?
jQuery
<script>
$(document).ready(function(){
$("input").click(function(){
$("span").toggle();
});
});
</script>
HTML
<form class="banner_location_box">
<label class="label_head"><?php echo $lang ['select_page'];
?></label><br/>
<label class="select_page"><input type="radio"
class="select_location" name="page_id" value="1"
checked="checked"/><span><?php echo $lang ['home']; ?><span
class="span_home_2">(<?php echo $lang ['available_only'];
?>)</span></span></label><br/>
<label class="select_page"><input type="radio"
class="select_location" name="page_id" value="2"/><span><?php echo
$lang ['business']; ?></span></label><br/>
<label class="select_page"><input type="radio"
class="select_location" name="page_id" value="3"/><span><?php echo
$lang ['jobs']; ?></span></label><br/>

No comments:

Post a Comment