Set Link Active |
||
Welcome to the Zymic webmaster forums. Our forums are here to provide people the free ability to discuss a range of websites related topics such as design, development coding and marketing.
In order to post you will need to register for a zymic account or if you already have one simply login by using the form on the left.
Zymic Webmaster Forums Web Design & Development Client Side Scripting JavaScript |
||
![]() |
Set Link Active |
||
Jul 2 2008, 02:08 PM
Post
#1
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,196 Joined: 19-September 07 Member No.: 234 |
Ive been searching over google but my keywords ar not good so i do not get good sites with what i need.
Ive looked around and saw some parts of code and the language needed for my problem. See, i applied an effect to my links when they are set to active. When using .html pages i can set them to class="active", so each pages i will change the class="active" to its link so when user hits a page it is set to active. The problem is, i am not using .html pages, which means i can not dirrectly set my pages to ="active" and when you switch to a page it changes to active :/ So i am looking for a javascript code that (once clicked) the link will basically turn on class="active", also it needs to set my home page as active. So when i start my page it directly puts my home button on active, once i click about us, it turns about us to active (keeps it active while i am on page ofcourse) ... i think it has to do with onClick="" but i really can't figure it out :/ |
|
|
Jul 3 2008, 01:10 AM
Post
#2
|
|
![]() Outrageously Uber Ninja ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,196 Joined: 19-September 07 Member No.: 234 |
found out that it was impossible to stick the active class if the page reloads. and its wha happened with the script i had, it worked right before the page changes and than it disapeard.
Solution, well its the IF statement from PHP which sets the path in the browser and from this path it tells which ID to set the class="active" unfortunately it works only on direct paht such as /page.php and not inside page.php?id=something, which again screwed me over Still searching but i guess its not a mater og Javascript. |
|
|
![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users) |
||
| 0 Members: | ||
Forum Jump |
||
| Lo-Fi Version | Time is now: 24th May 2013 - 07:55 AM |