<table>
<?php
$squery = "SELECT DISTINCT(Year_Played) AS yp, Sessions FROM pinkpanther_games ORDER BY id DESC";
$sresults = mysql_query($squery);
while ($srow = mysql_fetch_assoc($sresults)){
echo "<tr><td>";
echo "<a href='#' onclick=\"\">Session " . $srow['Sessions'] . "<br>" . substr($srow['yp'], 0, 4) . "-". substr($srow['yp'], 4, 7) . "</a>";
echo "</td></tr>";
}
?>
</table>
and then i have this function:
<script type="text/javascript">
$("#spicker td").bind("click", function(){
$(this).attr("class", "special");
});
</script>
and it doesn't work. I have tried this function on a table not created with php and it works fine so i don't know what is wrong
this is the style I'm trying to change to:
.special{
width: 150px;
padding-left:25px;
padding-top: 25px;
padding-bottom: 25px;
background-color: #fff;
color: #000;
}

New Topic/Question
Reply


MultiQuote


|