Ciao a tutti ho un dilemma con questa funzione JQuery.
Con il selettore #selectable attivo, il tag <a href> non funziona (non switcha le pagine).
Cosa potrebbe essere?
Con il selettore #selectable attivo, il tag <a href> non funziona (non switcha le pagine).
Cosa potrebbe essere?
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Javascript</title>
<style>
body {
width:960px;
border: solid 2px gray;
margin:auto;
text-align:center;
height:900px;
}
#menu {
width:100%;
height: 100px;
background-color: gray;
}
#menu ul {
list-style:none;
float:left;
width:100%;
margin:0 auto;
}
#menu ul li {
float:left;
width:290px;
height: 70px;
text-align:center;
margin:5px;
line-height: 70px;
}
.stndr {
font-size: 19px;
}
#feedback { font-size: 15px; }
#selectable .ui-selecting li{ background: gray; }
#selectable .ui-selected li{ background: white;}
#selectable { list-style-type: none; margin: 0; padding: 0; width: 500px; }
#selectable li { margin: 3px; padding: 0.4em; font-size: 1.4em; height: 18px; }
#selectable a .ui-selecting{color:black}
</style>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
</head>
<body>
<h1>Selectable Menu</h1>
<div id="container">
<div id="menu">
<?php
switch (isset($_GET['content'])) {
case 'autoveicoli' :
///modifico array dei parametri
break;
case 'attrezzature' :
//modifico array dei parametri
break;
case 'impianti' :
//modifico array dei parametri
break;
//es. array("value" => ($r["archiviata"] == "Y") ? "SI" : "NO", "align" => "center")
}
?>
<ul id="selectable">
<a href ="javascript.php?content=autoveicoli" ><li>Autoveicoli e mezzi d'opera</li></a>
<a href ="javascript.php?content=attrezzature" ><li>Attrezzature e macchinari</li></a>
<a href ="javascript.php?content=impianti" ><li>Impianti completi</li></a>
</ul>
<script>
$(function() {
$( "#selectable" ).selectable();
});
</script>
</div>
</div>
</body>
</html>