Question

I have a question about Jquery, it is possible to unbind an element to a script. Example:

$("a[rel^='prettyPhoto']").prettyPhoto();

I want to run something like:

$("a[rel^='prettyPhoto']").unbind('prettyPhoto');

and if I click on the element, the prettyPhoto doesn't work.

I have try this but... it is not working.. :/

it is possible?

thank you

Was it helpful?

Solution

Ok I have find the issues.

So, in the PrettyPhoto ( or others plugins ) they have some Bind event. So,

for my issue, the binding is

click.prettyphoto

so the code fixed code is:

 $("a[rel^='prettyPhoto']").unbind('click.prettyphoto');

:-)

I hope this will help someone!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top