Can you recommend a good free Javascript pop-up menu?
Moderator: General Moderators
Can you recommend a good free Javascript pop-up menu?
Im looking for a free pop-up menu script.
I already have one but i doesn't have a particular feature i am looking for
I am looking for one that can position the menus relative to an image.
Thanks
Mark
I already have one but i doesn't have a particular feature i am looking for
I am looking for one that can position the menus relative to an image.
Thanks
Mark
Code: Select all
<script language="javascript" type="text/javascript">
<!--
function display(text) {
var x = window.event.x;
var y = window.event.y;
document.getElementById("info").style.left = x;
document.getElementById("info").style.top = y;
document.getElementById("info").innerHTML = text;
document.getElementById("info").style.display = "block";
}
function hide() {
document.getElementById("info").style.display = "none";
}
//-->
</script>
<div id="info" style="top:0;left:0;position:absolute;display:none;width:100;height:50;background:#cccccc;border:1 solid black"></div>
<br /><br /><br /><br /><br /><br />
<p onMouseOver="display('nay rules!');" onMouseOut="hide()">
who is nay?
</p>-Nay
ps: Not so good but it's free
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
This work in both IE and Mozilla. Not PHP but let us benefit from the source coloring for Javascript too:
Regards,
Scorphus.
Code: Select all
<script language="javascript" type="text/javascript">
<!--
// First we need to know what is the user's browser
var isExplorer4p = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4");
var isNetscape5p = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "5");
function display (text, event) { // Mozilla: need to pass the event as function argument
var x, y;
if (isNetscape5p) {
x = event.layerX;
y = event.layerY;
}
else {
x = window.event.x;
y = window.event.y;
}
document.getElementById("info").style.left = x;
document.getElementById("info").style.top = y;
document.getElementById("info").innerHTML = text;
document.getElementById("info").style.display = "block";
return;
}
function hide () {
document.getElementById("info").style.display = "none";
return;
}
//-->
</script>
<div id="info" style="top:0;left:0;position:absolute;display:none;width:100;height:50;background:#cccccc;border:1 solid black"></div>
<br /><br /><br /><br /><br /><br />
<p onMouseOver="display('nay rules!', event);" onMouseOut="hide()">
who is nay?
</p>Scorphus.
By far the best one I've ever seen is ypSlideoutMenus from http://www.youngpup.com. Aaron's also a real nice guy, and although he's pretty busy, he'll help you out if your question is more than very basic.
Oh, oops... in included the period as part of the URL. Hey, and also it's .net and not .com! I'm on a roll today (or yesterday, rather)!
http://www.youngpup.net
Sorry.
http://www.youngpup.net
Sorry.
- Vincent Puglia
- Forum Commoner
- Posts: 67
- Joined: Thu Sep 04, 2003 4:20 pm
- Location: where the World once stood
Hi,
if you are still looking for one: http://www.brainjar.com -- Revenge of the Menu Bar -- while the demo shows text, you can replace the text with an image. You will also have to modify the main div's height.
Vinny
if you are still looking for one: http://www.brainjar.com -- Revenge of the Menu Bar -- while the demo shows text, you can replace the text with an image. You will also have to modify the main div's height.
Vinny