mypage() is a long function which returns the page number, number of pages, next page etc’ (similar to pagination).
selectPage() is a javascript/Ajax script which send to the server the current page number.
My CSS file present me the ‘hover’ color of the page number but ignore of the ‘current’ color of the page number.
What is the correct syntax to write the CSS file for ‘current’.
function mypage($total, $start) {
;
;
$mypage.= "<li><a href='javascript:selectPage(".$counter.")'>$counter</a></li>";
;
;
return $mypage;
}
The CSS file:
ul.mypage li a:hover, ul.mypage li a.current
{
color:#AAA;
}
Sven’s comment, the link needs a class of
currentIf you want to add current when something is clicked, there’s more work involved:
this.className='current'but you also need to remember the one that had current previously and remove it