/    Sign up×
Community /Pin to ProfileBookmark

Advanced javascript

Can someone please tell me how to create the effects you get at download.com when you mouse over a link. Is this javascript or something else, becasuse I am not able to fully understand the code in the view source.

Thank you in advance for your replies.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@theRatWonderApr 17.2007 — Yeah it will deffo be javascript.
[CODE]
<html>
<head>
<script type="text/javascript">
function displayBox(e) {
var myDiv = document.createElement('div');
myDiv.appendChild(document.createTextNode('bla bla bla bla bla bla de bla de de de hello world I am a fish etc')); // put whatever you like in the div
myDiv.style.position = "absolute";
myDiv.style.left = e.clientX;
myDiv.style.top = e.clientY;

var myTimeout = window.setTimeout(function () {document.body.appendChild(myDiv)},1000);

this.onmouseout = function() {
clearTimeout(myTimeout);
document.body.removeChild(myDiv);
}

return;
}
</script>
</head>
<body>
<span onmouseover="displayBox(event)">some text</span>
</body>
</html>
[/CODE]


Something similar to that. Obviously that doesn't look half as flash.

Robin.
Copy linkTweet thisAlerts:
@theRatWonderApr 17.2007 — Moment of arrogance - I wrote that whole thing blind, and just tried it out and it worked perfectly ? (probably only in firefox tho).
Copy linkTweet thisAlerts:
@ricpApr 17.2007 — Moment of arrogance - I wrote that whole thing blind, and just tried it out and it worked perfectly ? (probably only in firefox tho).[/QUOTE]
Ooooh, hark at her!

Have a lolipop for being so good! :p
Copy linkTweet thisAlerts:
@theRatWonderApr 17.2007 — Alright, enough cheek out of you. I was impressed. That's all that matters.

:p
×

Success!

Help @funkyfraisre 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.20,
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,
)...