javascript - Fancybox custom div show/hide -
i have custom post type in wordpress creates gallery of images (unordered list) open in fancybox. created dynamic div of sold label within fancybox javascript appears on left corner of image in lightbox across close button. want label show if image within category "sold". there way this?
for interested, figured out on own. added category slug fancybox link class this: <?php theme_get_categories($post->id, 'gallery_category', ' ', 'slug'); ?>
then created fancybox helper class in javascript file creates new wrapper class this:
tpl: { wrap : '<div class="fancybox-wrap fancybox-desktop fancybox-type-image fancybox-opened" tabindex="-1"><div class="fancybox-skin"><div id="sold-label" class="sold-label"><h2>sold</h2></div><div class="fancybox-outer"><div class="fancybox-inner"></div></div></div></div>' },
Comments
Post a Comment