- $("a[rel^='prettyPhoto']").prettyPhoto(ppArgs);
- <?php if($data['lightbox_post_images']): ?>
- $('.single-post .post-content a').has('img').prettyPhoto(ppArgs);
- <?php endif; ?>
- var mediaQuery = 'desk';
- if (Modernizr.mq('only screen and (max-width: 600px)') || Modernizr.mq('only screen and (max-height: 520px)')) {
- mediaQuery = 'mobile';
- $("a[rel^='prettyPhoto']").unbind('click');
- <?php if($data['lightbox_post_images']): ?>
- $('.single-post .post-content a').has('img').unbind('click');
- <?php endif; ?>
- }
- // Disables prettyPhoto if screen small
- $(window).resize(function() {
- if ((Modernizr.mq('only screen and (max-width: 600px)') || Modernizr.mq('only screen and (max-height: 520px)')) && mediaQuery == 'desk') {
- $("a[rel^='prettyPhoto']").unbind('click.prettyphoto');
- <?php if($data['lightbox_post_images']): ?>
- $('.single-post .post-content a').has('img').unbind('click.prettyphoto');
- <?php endif; ?>
- mediaQuery = 'mobile';
- } else if (!Modernizr.mq('only screen and (max-width: 600px)') && !Modernizr.mq('only screen and (max-height: 520px)') && mediaQuery == 'mobile') {
- $("a[rel^='prettyPhoto']").prettyPhoto(ppArgs);
- <?php if($data['lightbox_post_images']): ?>
- $('.single-post .post-content a').has('img').prettyPhoto(ppArgs);
- <?php endif; ?>
- mediaQuery = 'desk';
- }
- });