I’m using twitter bootstrap with grails and have the following in my layout:
<div class="nav-collapse">
<ul class="nav">
<li><a href="${createLink(uri: '/request/new')}">My Link</a></li>
</ul>
</div>
On my page I have the following:
<html>
<head>
<meta name="layout" content="bootstrap">
</head>
<body>
sometext
</body>
</html>
Question
In my layout how do I detect when the My Link action is clicked? so that I can highlight it using class="active"
Here is how I tend to do this.
First, in your layout, you would do something like this:
And in your page:
foois the trigger to apply the.activeclass.