Skip to content

Instantly share code, notes, and snippets.

@wrongkitchen
wrongkitchen / jq-plugin-boilerplate.js
Created November 6, 2012 11:19 — forked from Ahrengot/jq-plugin-boilerplate.js
jQuery: Plugin Template
(function($) {
$.fn.pluginName = function(options) {
var defaultOptions = {
option1: 'ahrengot',
option2: true,
option3: false
}
var options = $.extend(defaultOptions, options);
@wrongkitchen
wrongkitchen / ValidateEMail.js
Created November 6, 2012 11:07
JavaScript: Validate E-Mail
function checkMail(email){
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
if (filter.test(email)) {
return true;
}
return false;
}
@wrongkitchen
wrongkitchen / detectMobile.js
Created September 26, 2012 05:11 — forked from keriati/detectMobile.js
Javascript: Mobile Browser Detection
function detectMobile() {
return (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase()));
}