简体   繁体   中英

How to alter prettyPhoto description HTML?

hello i want to modify the "description html" of the prettyPhoto i dont think there is a callback available when prettoPhoto lightbox is "shown" (but a callback for close exist)

what do you guys recommend?

Looking at the documentation, there is:

changepicturecallback: function(){}, /* Called everytime an item is shown/changed */

As long as that fires when the first picture is shown, you could create a function to check a globally available variable and do your magic on startup, set the pretty_opened variable (or whatever you want to call it) to true, then use the callback to set it to false on close.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM