Skip to content

Instantly share code, notes, and snippets.

var image_data_cache = {};
function isPointInImage(x, y, img) {
var w = img.width;
var h = img.height;
var parentOffset = $(img).parent().offset();
x = x - parentOffset.left;
function validateEmail(email) {
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
function validateMobile(mobile) {
var re1 = /\d{8}/g;
return re1.test(mobile);
}
var _sliderDiv = $('.galleryholder'),
_sliderInterval = null,
_mouseX = 0,
_windowWidth = $(window).width();
_sliderDiv.on('mousemove',function(e){
_mouseX = e.pageX;
});