Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

help with javascript

Name: Kyur 2008-12-09 22:08

Hey /prog/

I need some help with javascript.  I'm a newfag at the language...but I've learned all the basics from w3schools and I took a year and a half of regular Java so I'm not a moron.  This stuff is just kind of advanced for me at this stage.

http://www.hesido.com/web.php?page=javascriptanimation

I want to learn how to do that.  Specifically I want to learn how to do the demo with the sliding menus where it changes the width.  Unfortunately they don't give you any working source code to work with...just snippets of the code.  These snippets aren't enough to piece together myself so I need your help.  Plus, they don't go into too much detail so it's kind of confusing (even though it seems like they explain it well)

How am I supposed to implement this into an HTML page?

I've started a test page and made a div tag with id="test"...but now I don't know how to pass it to those functions....or attach a listener to it.  Please help!

Name: Anonymous 2008-12-09 22:31

Please help..

Name: Anonymous 2008-12-09 22:37

How about you just fuck right the fuck off?

Name: Anonymous 2008-12-09 22:38

Unfortunately they don't give you any working source code
0/10

Name: Anonymous 2008-12-09 22:46

You might want to start by looking at the three scripts in the page:
[url]http://www.hesido.com/resources/code/mainscripts.js[/url]
[url]http://www.hesido.com/web/animfunctions.js[/url]
[url]http://www.hesido.com/web/pagefunctions.js[/url]
... and sometimes the CSS does magical things, so look at the CSS definitions in the <style> tag, as well.

Name: Anonymous 2008-12-09 22:48

[s]I be[b]li[/s]eve you mea[/b]nt ECMAScip[/b]t.

Name: Anonymous 2008-12-10 1:33

Its fucking easy. Animations are built in to JavaScript.

test.fadeIn(1000);

that will fade your test div in after 1 second, the parm takes an integer in milliseconds.

Name: Anonymous 2008-12-10 9:42

how do i make a test div

Name: Anonymous 2008-12-10 9:50

>>6
Please refrain from trolling.

Name: Anonymous 2008-12-10 16:20

>>1
A simple ctrl+u would have revealed the HTML source and you would see it links to three different javascript sources.
On line 15 you see,

...script src="/web/animfunctions.js" ...

This is a relative address to the functions you are looking for, but since you would probably struggle with that, the whole address is http://www.hesido.com/web/animfunctions.js

Name: Anonymous 2008-12-10 22:20

[quote]I took a year and a half of regular Java so I'm not a moron.[/quote]

^_~

Name: Anonymous 2008-12-10 22:33

[quote]I took a year and a half of regular Java so I'm not a moron.[/quote]

^_~

^_~

Name: Anonymous 2008-12-10 22:33

[quote]I took a year and a half of regular Java so I'm not a moron.[/quote]
I took a year and a half of regular BBCode so I'm not a moron.

Name: Anonymous 2008-12-10 22:58

Another reason Java is such shit:

Netscape created a shit prototype based scripting language for their browser called Live Script.

Sun, knowing Java was shit, needed a stupid way to market it. So they struck a deal with Netscape. They could bundle a Java VM with their browser, it if they renamed Live Script to JavaScript.

What does one have to do with the other? Absolutley nothing. But OP thinks it does, "regualr Java" so their faggy scheame worked.

Name: Anonymous 2008-12-11 0:09

"I took a year and a half of regular Java so I'm not a moron."

Discuss this... "I'm not a moron" more, would you?

Name: Anonymous 2008-12-11 0:12

>>14
Wrong again. Gosling was the original lead on both projects.

Name: Anonymous 2010-11-28 11:05

Name: Anonymous 2010-12-24 15:20

Don't change these.
Name: Email:
Entire Thread Thread List