/    Sign up×
Community /Pin to ProfileBookmark

How do you do the menus on webdeveloper.com?

On the “Search” menu, if you click on little arrow beside it, it will popup a little box for you to type in. If you mouseout, it stays there. But if you click on anywhere else on the screen, outside the box, it disappears.

How do you do this behaviour? I tried looking at the javascript code, but it’s pretty complicated.

Any ideas how to do this?

to post a comment
JavaScript

5 Comments(s)

Copy linkTweet thisAlerts:
@Luke101Jul 27.2006 — This site is using [url="http://www.vbulletin.com]vBulletin[/url]. And the program has that built into it. Try even contact webdeveloper. Its vbulletin! This cost. I would like VB but i dont want to pay! Sorry, Try buying VB.
Copy linkTweet thisAlerts:
@klanga2049authorJul 27.2006 — Ummmm.... I don't want to get a bulletin board.. I just want to know how the Javascript works.
Copy linkTweet thisAlerts:
@klanga2049authorJul 27.2006 — Does anyone know?
Copy linkTweet thisAlerts:
@aPersonJul 28.2006 — Well I looked at the code, and it sure is pretty interesting.

To the best of my knowledge, when you mouse over the menu, it sets document.onclick to nothing. When you mouse out of the menu (your mouse is no longer over it), it sets document.onclick to close the menus.

<i>
</i>else if (is_moz)
{
tds[i].onmouseover = moz_rclick;
tds[i].onmouseout = moz_rclick;
}


function moz_rclick(e)
{
if (e.type == 'mouseover')
{
document.onclick = '';
}
else
{
document.onclick = vbmenu_close;
}
}
Copy linkTweet thisAlerts:
@klanga2049authorJul 28.2006 — Thanks alot for the help. ?
×

Success!

Help @klanga2049 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...