<div class="Span3"> <ul class="nav nav-pills nav-stacked"> <li><a href="#" id="UploadFile">Uploading Files (WORD)</a></li> <li><a href="#" id="Rawcorpus">Raw Corpus (TXT)</a></li> <li><a href="#" id="Annocorpus">Annotation Corpus (XML)</a></li> </ul></div>
The script is as follows:
<script type="Text/javascript">$( function() {$("Li"). Click ( function() { //The first method //$ ("Li"). Removeclass ("active");//delete the specified class attribute //$ (this). AddClass ("active");//Add one or more classes to the selected element //$ (this). Toggleclass ("active");//The function switches the selected element to the Add/Remove class varText = $ ( This). text ();//Gets the currently selected text //or use the second method$( This). AddClass ("Active"). Siblings (). Removeclass ("Active"); }); })</script>
A package hyperlink in the Li list that causes the user to select a hyperlink that is active and the other hyperlinks are inactive