I'm using prettyPhoto to pop open YouTube videos, with a Facebook like button where the description field would be. The like button requires a URL for it to share, otherwise I'll get an error.
The problem I'm currently having is figuring out what that URL should be when the user selects it. Doing so would be really easy if I could simply pass parameters to prettyPhoto's changepicturecallback, but the documentation doesn't mention a way to do so. Any ideas?
An image of my prettyPhoto popup: http://lh5.ggpht.com/_XNoyY-rljvo/TGrFPIUiOSI/AAAAAAAAADE/s9-5tNwBbX8/prettyPhoto.png
Or in any other way so you can choose what parameters should be passed to callback method.
The javascript method apply allows you to change in which context a function should be called and also which parameters should be pass to it. Marcelo Moises
Actually the above doesn't work as expected, but the following will. Replace this lines in order to have the clicked element (that triggers the prettyPhoto) as the callback function context:
I know this maybe not exactly what you are looking for, but at least can give you an idea how to change the context which the callback function runs in. All these replacements were made on the development & uncompressed version of prettyPhoto Marcelo Moises