$(document).ready(function() { $("#notifications").slideUp("fast"); }); function message_box(content) { $("#message_box").modal('show'); $("#message_content").html(content); } function modal_box(content) { $("#modal_box").modal('show'); $("#modal_content").html(content); } function confirm_box(content,button1,button2,conf_option) { $("#confirm_content").html(content); $("#confirm_yes").html(button1); $("#confirm_yes").attr("name",conf_option); $("#confirm_no").html(button2); $("#confirm_no").attr("name",conf_option); $("#confirm_box").modal('show'); } function notify(text,type) { $("#notifications").fadeIn("slow"); $("#notification_text").html(text); if(type==1) { $("#notification_text").css("background","#a8ffa8"); $("#notification_text").css("color","#009100"); } else if(type==2) { $("#notification_text").css("background","#ffdcb9"); $("#notification_text").css("color","##ff8204"); } else if(type==3) { $("#notification_text").css("background","#ffcece"); $("#notification_text").css("color","#ff4a4a"); } else { $("#notification_text").css("background","#d2cffe"); $("#notification_text").css("color","#6666ff"); } setTimeout(function(){ $("#notifications").slideUp("fast"); }, 3000); } function animateCSS(element, animationName, callback) { const node = document.querySelector(element) node.classList.add('animated', animationName) function handleAnimationEnd() { node.classList.remove('animated', animationName) node.removeEventListener('animationend', handleAnimationEnd) if (typeof callback === 'function') callback() } node.addEventListener('animationend', handleAnimationEnd) } 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(String(email).toLowerCase()); } function onHuman(response) { id = $("#user").html(); ajax_call("verify_captcha",id,response); }