Remove Active link on click
Hi Guys,
I know this is simple to do but i have no idea how to do it. I have the sript below. What i want to do is to remove the active link highlight wheni click the same link.
Thanks in advance
- <script type="text/javascript">
- $(function() {
- var links = $('a.link').click(function() {
- links.removeClass('active');
- $(this).addClass('active');
- $(this).on('click', 'a.active', function(e){
- // Make the old tab inactive.
- $active.removeClass('active');
- $content.hide();
- e.preventDefault();
- });
- });
-
- });
- </script>