RollOver Nav HTML & JQuery
4 posters
Page 1 of 1
RollOver Nav HTML & JQuery
I got the rollover effect working, but only for one button. i don't know where to add this code, so i have more space to add more links and buttons.
I tried to put this code in "General">"Configuration">"Site Description", but there is limited space there. Also when i put this code in the "Homepage">"Generalities">"Message", it only displays on the forum and not the portal.
This is my code:
Where can i add this code in a bigger version so it applies to all pages?
I tried to put this code in "General">"Configuration">"Site Description", but there is limited space there. Also when i put this code in the "Homepage">"Generalities">"Message", it only displays on the forum and not the portal.
This is my code:
- Code:
<ul id="topnav">
<li><a href="http://m3rcs.forummotion.com">Home</a></li>
</ul>
<script type="text/javascript"
src="http://m3rcs.forummotion.com/10687.js"></script>
Where can i add this code in a bigger version so it applies to all pages?
Re: RollOver Nav HTML & JQuery
Well your javascript file doesn't need to be referenced in HTML. Go to your javascript file in Modules and just click 'In all pages'.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: RollOver Nav HTML & JQuery
Right ok, it still works without the html reference, but i only have space for 3 buttons in the "General">"Configuration">"Site Description". Is there somewhere else i can put this html code:
- Code:
<ul id=topnav>
<li><a href=http://m3rcs.forummotion.com>Home</a></li>
<li><a href=http://m3rcs.forummotion.com/forum>Forum</a></li>
<li><a href=http://m3rcs.forummotion.com/faq>FAQ</a></li>
<li><a href=http://m3rcs.forummotion.com/profile?mode=editprofile>Profile</a></li>
<li><a href=http://m3rcs.forummotion.com/privmsg?folder=inbox>Inbox</a></li>
</ul>
Re: RollOver Nav HTML & JQuery
In an Announcement. Or a widget.
If you put it ina widget you will need to use CSS to place it where you want it.
If you put it ina widget you will need to use CSS to place it where you want it.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: RollOver Nav HTML & JQuery
Thank you for your reply
Ok i have put that code into the Announcements, but i don't see any buttons only an empty block of where announcements supposed to be.
Putting it in a widget doesn't work btw
Could i use HTML pages for this? If yes how would i go about doing that, would i have to call/reference the html code somewhere?
Ok i have put that code into the Announcements, but i don't see any buttons only an empty block of where announcements supposed to be.
Putting it in a widget doesn't work btw
Could i use HTML pages for this? If yes how would i go about doing that, would i have to call/reference the html code somewhere?
Re: RollOver Nav HTML & JQuery
This:
- Code:
<ul id=topnav>
<li><a href=http://m3rcs.forummotion.com>Home</a></li>
<li><a href=http://m3rcs.forummotion.com/forum>Forum</a></li>
<li><a href=http://m3rcs.forummotion.com/faq>FAQ</a></li>
<li><a href=http://m3rcs.forummotion.com/profile?mode=editprofile>Profile</a></li>
<li><a href=http://m3rcs.forummotion.com/privmsg?folder=inbox>Inbox</a></li>
</ul>
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: RollOver Nav HTML & JQuery
That's exactly what i had
Activate announcements : Yes
Announcements display : All Pages
Scrolling : Deactivated
But there is only an empty box above my forum when i put the code there.
have look yourself, maybe you'll see the problem.
http://m3rcs.forummotion.com/forum
Activate announcements : Yes
Announcements display : All Pages
Scrolling : Deactivated
But there is only an empty box above my forum when i put the code there.
have look yourself, maybe you'll see the problem.
http://m3rcs.forummotion.com/forum
Re: RollOver Nav HTML & JQuery
If you have anything else in announcements field list, make sure these codes(rollover navs) are 1st in order .
Beautiful site by the way
Beautiful site by the way
Last edited by WHITESABBATH on October 22nd 2011, 3:36 pm; edited 1 time in total
WHITESABBATH- Active Poster
- Posts : 1198
Reputation : 119
Language : English, F-Bombs
Location : Chicago
Re: RollOver Nav HTML & JQuery
hymm. i tested it and got same as you. when i moved it to the top of list, it appeared. using same version as you.
edit: where's nera when ya need her. Oh nera...
edit: where's nera when ya need her. Oh nera...
Last edited by WHITESABBATH on October 22nd 2011, 3:57 pm; edited 2 times in total (Reason for editing : removed link)
WHITESABBATH- Active Poster
- Posts : 1198
Reputation : 119
Language : English, F-Bombs
Location : Chicago
Re: RollOver Nav HTML & JQuery
That is so weird ... hmm
ok another idea:
Is there any code for referencing or calling an html file/code like this
<script type="text/javascript"
src="http://m3rcs.forummotion.com/10687.js"></script>
ok another idea:
Is there any code for referencing or calling an html file/code like this
<script type="text/javascript"
src="http://m3rcs.forummotion.com/10687.js"></script>
Re: RollOver Nav HTML & JQuery
I wish i knew Cath. sorry.
WHITESABBATH- Active Poster
- Posts : 1198
Reputation : 119
Language : English, F-Bombs
Location : Chicago
Re: RollOver Nav HTML & JQuery
No Problem, Thank you for your time anyways
Anyone else? ... am this close to giving up
[EDIT]
Is there any code for referencing or calling an html file/code like this
<script type="text/javascript"
src="http://m3rcs.forummotion.com/10687.js"></script>
Anyone else? ... am this close to giving up
[EDIT]
Is there any code for referencing or calling an html file/code like this
<script type="text/javascript"
src="http://m3rcs.forummotion.com/10687.js"></script>
Re: RollOver Nav HTML & JQuery
Yes you can use Ajax to call other HTML documents.
I'm not sure as to why your HTML isn't showing up in announcements. Odd.
Try temporarily removing the javascript file which is related to this navbar from javascript management.
I'm not sure as to why your HTML isn't showing up in announcements. Odd.
Try temporarily removing the javascript file which is related to this navbar from javascript management.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: RollOver Nav HTML & JQuery
Javascript removed, nothing changed, no links came up in the announcements.
Oh man Ajax is totally over my head, i wouldn't know what to do with that.
Oh man Ajax is totally over my head, i wouldn't know what to do with that.
Re: RollOver Nav HTML & JQuery
Try doing this then:
- Code:
$(function() { $('#main-content').prepend('<ul id=topnav> <li><a href=http://m3rcs.forummotion.com>Home</a></li> <li><a href=http://m3rcs.forummotion.com/forum>Forum</a></li> <li><a href=http://m3rcs.forummotion.com/faq>FAQ</a></li><li><a href=http://m3rcs.forummotion.com/profile?mode=editprofile>Profile</a></li><li><a href=http://m3rcs.forummotion.com/privmsg?folder=inbox>Inbox</a></li> </ul>'); });
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: RollOver Nav HTML & JQuery
Right ok, that puts the buttons in the announcement area, but they don't roll over (yet hopefully) nor react as links.
Re: RollOver Nav HTML & JQuery
Now we will put the script below it. Change the code to this:
- Code:
$(function() {
$('#main-content').prepend('<ul id=topnav><li><a href=http://m3rcs.forummotion.com>Home</a></li><li><a href=http://m3rcs.forummotion.com/forum>Forum</a></li><li><a href=http://m3rcs.forummotion.com/faq>FAQ</a></li><li><a href=http://m3rcs.forummotion.com/profile?mode=editprofile>Profile</a></li><li><a href=http://m3rcs.forummotion.com/privmsg?folder=inbox>Inbox</a></li></ul><script type="text/javascript" src="http://m3rcs.forummotion.com/10687.js"></script>');
});
Last edited by LGforum on October 22nd 2011, 4:32 pm; edited 2 times in total
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: RollOver Nav HTML & JQuery
Not sure but there might be a lil typo somewhere, because it changed to only one button with "/script>" on it.
Re: RollOver Nav HTML & JQuery
Yup sorry, edited the code above.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: RollOver Nav HTML & JQuery
The script thingy is gone, now its only one static button.
I feel so bad for making you give so much time to do this.
I feel so bad for making you give so much time to do this.
Re: RollOver Nav HTML & JQuery
Again edited the script above lol.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: RollOver Nav HTML & JQuery
Now you need to add the javascript that makes them do what you want them to do back onto your forum. Get the file number and put it in my script above.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: RollOver Nav HTML & JQuery
- Code:
$(document).ready(function() {
$("#topnav li").prepend("<span></span>"); //Throws an empty span tag right before the a tag
$("#topnav li").each(function() { //For each list item...
var linkText = $(this).find("a").html(); //Find the text inside of the <a> tag
$(this).find("span").show().html(linkText); //Add the text in the <span> tag
});
$("#topnav li").hover(function() { //On hover...
$(this).find("span").stop().animate({
marginTop: "-97" //Find the <span> tag and move it up 97 pixels
}, 250);
} , function() { //On hover out...
$(this).find("span").stop().animate({
marginTop: "0" //Move the <span> back to its original state (0px)
}, 250);
});
});
So put this code above your code?
Re: RollOver Nav HTML & JQuery
No below it. In the same file.
OR, in its own seperate file, and then get the script file number, and place it in the script tag in my code.
OR, in its own seperate file, and then get the script file number, and place it in the script tag in my code.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Re: RollOver Nav HTML & JQuery
I have played around with the codes, and can't get it to be the way i envision it to be. So decided to go a slightly different way with only using 4 main rolling buttons.
I want to Thank everyone who took time to help me on this!
Topic can now be Locked.
I want to Thank everyone who took time to help me on this!
Topic can now be Locked.
Nera.- Energetic
- Posts : 7078
Reputation : 2017
Language : English
Location : -
Similar topics
» Why is Jquery not working on HTML Page
» HTML Pages and Java/JQuery
» HTML Page Jquery Code Position
» JQuery Help
» Rollover Image?
» HTML Pages and Java/JQuery
» HTML Page Jquery Code Position
» JQuery Help
» Rollover Image?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum