Jump to content

Why won't this work?


Username:

Recommended Posts

You don't need to wrap the code within a document ready event if it's within the body -- in-fact if it's within the body it makes more sense not to wrap it within the event. The problem is the position, you're trying to bind the event before you've actually defined the element. Move the JS just after and it would work.

Link to comment
https://forums.phpfreaks.com/topic/252020-why-wont-this-work/#findComment-1292127
Share on other sites

  Quote

You don't need to wrap the code within a document ready event if it's within the body -- in-fact if it's within the body it makes more sense not to wrap it within the event. The problem is the position, you're trying to bind the event before you've actually defined the element. Move the JS just after and it would work.

 

Well, it's gonna be a rather large code, so it has to be in a seperate file now anyway haha.

 

http://pictureunrelated.com/screengrabbr/2.30.55-AM_2011-11-29.png

 

It works alright I guess. It's really slow after about "Hello PHPFrea"

Link to comment
https://forums.phpfreaks.com/topic/252020-why-wont-this-work/#findComment-1292128
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.