Option Tree Special Settings

/*——————————————————————————–*/
/* Theme Options
/*——————————————————————————–*/
* This will hide the settings & documentation pages.
* @oudarya
*/
add_filter( ‘ot_show_pages’, ‘__return_false’ );

Advertisements

jQuery Domain Name Validation

jquery_logo

function validateEmail(email) {
document.getElementById(“vsubmit”).removeAttribute(‘disabled’,’disabled’);
var re = /^\s*[\w\-\+_]+(\.[\w\-\+_]+)*\@[\w\-\+_]+\.[\w\-\+_]+(\.[\w\-\+_]+)*\s*$/;
if (re.test(email)) {
if (email.indexOf(‘@xyz.in’, email.length – ‘@xyz.in’.length) !== -1) {

} else {
document.getElementById(“vsubmit”).setAttribute(‘disabled’,’disabled’);
alert(‘Email must be xyz.in domain (name.title@technokrats.in).’);
}
} else {
alert(‘Not a valid e-mail address.’);
}
}

HTML

<input type=”email” onblur=”validateEmail(this.value)” name=”email” value=”” placeholder=”email” required>