Hey,
I have the following code:
I am trying to make it so when you tick the box it changed the result to what you clicked, then if you untick it it changes the result back...
There will be multipal tick boxes on a page... Here is my code...
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function Tickbox(id){
$('#cb').unbind('change');
$('#cb').change(function() {
Untickbox(id);
return false;
});
$('#result').html(id);
}
function Untickbox(id){
$('#cb').unbind('change');
$('#cb').change(function() {
Tickbox(id);
return false;
});
$('result').html('none');
}
</script>
<div id="result"></div>
<input name="cb" type="checkbox" id="cb" value="img1" onChange="Tickbox('img1');">
Thanks for your help :)
Dan