What’s the quickest and easiest way to add the “active” class to a link, so it can be styled? I’m developing an app in CI, and I’d like a quick easy way to do this automatically.
jQuery is an option too…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You should really be using the CodeIgniter URI Class to do this instead of the $_SERVER[‘REQUEST_URI’]
$this->uri->uri_string()
^^ that is the preferred way to do things due to some complexities that can happen with codeigniter’s routing features