As a newcomer to JavaScript and AngularJS, my question may be considered naive by some.
I am currently working on a tutorial project involving AngularJS.
Here is the HTML code snippet I am dealing with:
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/>
<link href="http://acornejo.github.io/bootstrap-nav-wizard/bootstrap-nav-wizard.css" rel="stylesheet"/>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/>
<body>
<div class="container">
<ul class="nav nav-wizard">
<li class="active"><a href="#">Step1</a></li>
<li><a href="#">Step2</a></li>
<li><a href="#">Step3</a></li>
</ul>
<hr>
</div>
</body>
My goal is to make the <a>
tag active when clicked (i.e., set the attribute class of the corresponding <li>
element to active like in step1).
How can I achieve this programmatically on the client side?