Skip to content
This repository has been archived by the owner on Jan 20, 2021. It is now read-only.

Not working with jquery 2.0.0 ? #25

Closed
kabasakalis opened this issue May 12, 2013 · 6 comments
Closed

Not working with jquery 2.0.0 ? #25

kabasakalis opened this issue May 12, 2013 · 6 comments

Comments

@kabasakalis
Copy link

Hi,great extension!
I updated jquery to the new 2.0.0 and it seems photobox complains!

Uncaught TypeError: Cannot read property 'toggle' of undefined photobox.js:69

Line 69 is
autoplayBtn.on('click', APControl.toggle);

Stack on Chrome console

$.fn.photobox.target photobox.js:69
fire jquery-2.0.0.js:2863
self.add jquery-2.0.0.js:2909
jQuery.fn.jQuery.ready jquery-2.0.0.js:242
(anonymous function) photobox.js:65
(anonymous function)

Thanks!

@yairEO
Copy link
Owner

yairEO commented May 12, 2013

Will check right now

@yairEO
Copy link
Owner

yairEO commented May 12, 2013

very strange, works fine for me (Chrome & Firefox), and also the error makes no sense, why would it think "APControl" is undefined....it has nothing to do with jQuery..

@kabasakalis
Copy link
Author

I am working on a photobox directive for angular js,that's where it gives me the error.I just tested photobox standalone and it works OK,sorry about that!

@yairEO
Copy link
Owner

yairEO commented May 12, 2013

I'm glad there are alert people such as yourself. if you see more weird stuff let me know

@lekoala
Copy link

lekoala commented Jun 4, 2013

Hi there,

I had the same issue because I'm loading all my scripts with head.js so the document.ready fires almost immediately, thus, before APControl was defined. Could you move the $(doc).ready(prepareDOM); line at the end of the file? (i moved it just under function close() and it's working fine now)

@yairEO
Copy link
Owner

yairEO commented Jun 4, 2013

Did it, thanks.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants