All right so I tried using the button set.
So fair, I have been able to transform them into links.
But, the thing is the radio buttons don’t keep their active state.
Here is the code of jquery:
$( "#radio" ).buttonset();
$("input:radio[name=radio]").click(function() {
var id = $("input[@name=radio]:checked").attr('id');
window.location.replace("player.php?id=<?php echo $id; ?>&action="+id);
}
Here is the code of the butonset + the PHP code behind my web page:
<form>
<div id="radio" class="ui-buttonset">
<input type="radio" id="season" name="radio" value="season" /><label for="season">Season</label>
<input type="radio" id="playoff" name="radio" value="playoff" /><label for="playoff">Playoffs</label>
<input type="radio" id="carrer" name="radio" value="carrer" /><label for="carrer">Carrer</label>
<input type="radio" id="carrer_playoff" name="radio" id="carrer_playoff"/><label for="carrer_playoff">Carrer playoffs</label>
</div>
</form>
</center>
<br/><br/>
<?php
if($action == "playoff"){
include("player_playoff.php");
}
else if($action == "carrer"){
include("player_carrer.php");
}
else if($action == "carrer_playoff"){
include("player_carrer_playoff.php");
}
else{
include("player_season.php");
}
?>
This is the web page:
http://uweave.ca/uw-perso/Aravinthan_Sivaneswaran/COD_Circuit-TW/public%20v2.0/player.php?id=1&action=season
Thank you for your help,
Ara
EDIT:
if($radio.is(‘:checked’) === false) {
$radio.filter(‘[value=]’).attr(‘checked’, true);
}
if($radio.filter(‘[value=]’).attr(‘checked’, true)){
alert(“IN”);
}
I did this to check, but it always alerts me with IN but it doesnt put it in checked ( active ) state…
After reading comments to your question, here is what you are looking for
http://jsfiddle.net/seLTY/