I have this script:
<script type="text/javascript">
$(document).ready(function() {
var url = location.pathname;
if ("url:contains('message')") {
$("a#none").attr("class","active");
}
});
</script>
It nicely adds the class active to the url. However, it add the class active to the url even if the url does not contain the path message. What am I doing wrong?