View Single Post
Old 10-05-2012, 12:47 PM   PM User | #5
m2244
Regular Coder

 
Join Date: Jun 2012
Posts: 129
Thanks: 1
Thanked 1 Time in 1 Post
m2244 is an unknown quantity at this point
Quote:
Originally Posted by DanInMa View Post
you dont need to contain them inside of a function like that ( unless you only want to activate them on demand for some reason) , put this in a script block in the head section and give it a try

this will bind the lsiteners as soon as the dom is ready. if you need will be adding and removing elements on the fly, then you will need to go a step further and use .on()
Thanks for the help here.

The content on the page is dynamic, it is loaded every time the user clicks the 'next' button, so this needs to run each time that happens.

I tried to simplify this so that only one function is added, in an attempt to get something working here. Still nothing. Does it have something to do with the document not being ready?

I was just messing around with .on() but I get an error telling me that it is not a function. Does that mean that I have an old version of jQuery?

Last edited by m2244; 10-05-2012 at 01:00 PM..
m2244 is offline   Reply With Quote