javascript - Disable PrettyPhoto in code -
how can disable prettyphoto after has been enabled?
$(document).ready(function () { $("a[rel^='prettyphoto']").prettyphoto(); } $("#disableprettyphoto").click(function (e) { $("a[rel^='prettyphoto']").killprettyphoto(); });
on page images, use prettyphoto, need drag , drop action on same images. doing prettyphoto enabled not nice, fires popups when dragging , dropping (as should). when enable drag , drop, want disable prettyphoto , enable again when disable drag , drop.
i've had problem prettyphoto well. i've started using api have more control on plugin.
you can, however, use unbind() remove click handlers, drag/drop stuff, add prettyphoto again. take @ question (best way remove event handler in jquery?), should help.
Comments
Post a Comment