/**************************************************************************** * Hilight_Page ****************************************************************************/ $(document).ready(function(){ // URL is an object containing information based on the page you are on /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * { * "http": "http://", * "domain": "www.yourdomain.com", * "base": "http://www.yourdomain.com", * "path": "/page/home/", * "file": "index.php", * "cur": "http://www.yourdomain.com/page/home/index.php", * "rawparam": null, * "param": [], * "anch": null * } * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ var page = (URL.path + URL.file).replace("/index.php",""); $("a[href^='"+page+"']").addClass("current_page"); });