Disable PrettyPhoto on mobile phones (Sterling HTML template)

The following tutorial shows you how to disable prettyPhoto lighbox script in mobile browsers. This tutorial applies to Sterling HTML template only. Open up jquery.prettyPhoto.js Find the following codes at line 15

 jQuery(document).ready(function(){ 	jQuery("a[data-gal^='prettyPhoto']").prettyPhoto({social_tools: false}); }); 

and replace with the following codes.

 var isMobile = {     Android: function() {         return navigator.userAgent.match(/Android/i);     },     BlackBerry: function() {         return navigator.userAgent.match(/BlackBerry/i);     },     iOS: function() {         return navigator.userAgent.match(/iPhone|iPad|iPod/i);     },     Opera: function() {         return navigator.userAgent.match(/Opera Mini/i);     },     Windows: function() {         return navigator.userAgent.match(/IEMobile/i);     },     any: function() {         return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows());     } };  jQuery(document).ready(function(){ if( !isMobile.any()){ 	jQuery("a[data-gal^='prettyPhoto']").prettyPhoto({social_tools: false}); 	} });  

That’s all! Thanks!