jquery help - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: jquery help (/showthread.php?tid=26812) |
jquery help - El Forum - 01-23-2010 [eluser]richzilla[/eluser] Hi all, i know this isnt technically codeigniter, but these forums are the best for getting a sensible answer. Basically im trying to find away to highglight the current page, so for example the link in the navigation bar is highlighted when you are on that page. Ive thought of a jquery solution but it doesnt seem to be working: I have this in my header; Code: [removed] and in my header view: Code: <div id="nav"> any ideas where im going wrong? jquery help - El Forum - 01-23-2010 [eluser]Dyllon[/eluser] ID your body tags jquery help - El Forum - 01-24-2010 [eluser]vitoco[/eluser] Following the above advice ... [quote author="ricardino" date="1264304340"]Hi all, i know this isnt technically codeigniter, but these forums are the best for getting a sensible answer. Basically im trying to find away to highglight the current page, so for example the link in the navigation bar is highlighted when you are on that page. Ive thought of a jquery solution but it doesnt seem to be working: I have this in my header; Code: [removed] and in my header view: Code: <div id="nav"> jquery help - El Forum - 01-24-2010 [eluser]Patrick K[/eluser] Code: if($(this).attr("page_id") == <?php echo $page_id; ?>) page_id isn't a valid HTML attribute. I think you're using it incorrectly. for example: Code: <img src="sss" alt="image_name" title="this title" /> you'd .attr("alt") or .attr("title") if you want it to work you'd have to: Code: <a href="" title="1" class="unique-name"></a> |