So at the beginning the first link has class=active, when someone will click the 2nd link I want to change class of that link to “active” and rest to “inactive”. And of course if someone will click on “active” link, class should stay the same (class="active). I hope I’ve clearly described my problem.
I’m trying to change the way the link looks by changing the class, but clicking the link does not load new page, it loads new content to a div form a static page.
Ok, so what you are saying is : make a active link by adding another class (active link made from two classes), class=“class1 class2”?
but as soon as a link is clicked, the browser will go to a new page as specified in the link’s href, so I don’t see why you need to change how the link looks since you’ll be taken to another page.
That’s the problem… clicking a link will NOT take you to a new page, cause clicking will launch javascript which will change the content of a div and then return false, so the browser will not go to a new page.
Thx for a script, will check it later.
Update:
And the winner is: Kalon Thank you very much, this is what I was looking for.