Ciao a tutti,
dovrei far funzionare questo script all'interno di una pagina php, solo che purtroppo non mi va.
Mi sapete dire come mai?
il codice completo della mia pagina è il seguente.
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script type="text/javascript" src="./javascripts/jquery-latest.js"></script>
<script type="text/javascript" src="./javascripts/script.js"></script>
<script type="text/javascript" src="./javascripts/jquery.js"></script>
<script>
jQuery.noConflict();
</script>
<script type="text/javascript">
$('div .checkbox').click(function () {
var checkedState = $(this).prop("checked")
$(this)
.parent('div')
.children('.checkbox:checked')
.prop("checked", false);
$(this).prop("checked", checkedState);
});
</script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento senza titolo</title>
</head>
<body>
<div>
Red: <input id="chkRed" name="chkRed" type="checkbox" value="red" class="checkbox">
Blue: <input id="chkBlue" name="chkBlue" type="checkbox" value="blue" class="checkbox">
Green: <input id="chkGreen" name="chkGreen" type="checkbox" value="green" class="checkbox">
</div>
<div> Mango: <input id="chkRed" name="chkMango" type="checkbox" value="Mango" class="checkbox">
Orange: <input id="chkBlue" name="chkOrange" type="checkbox" value="Orange" class="checkbox">
Banana: <input id="chkGreen" name="chkBanana" type="checkbox" value="Banana" class="checkbox">
</div>
</body>
</html>
Grazie