jQuery(document).ready(function() { /*//Jquery for Tabs jQuery('.ab-wrap').tabs(); //Jquery for datepicker jQuery("#holidayDate").datepicker({ dateFormat : 'dd-mm-yy' });*/ //allow to insert only numeric digits with some brackets in input box jQuery(document).on('keypress keydown', ".numeric",function(e) { var regex = new RegExp("^[0-9.()+\t\b -]+$"); //var str = String.fromCharCode(!e.charCode ? e.which : e.charCode); var str = String.fromCharCode(!e.keyCode ? e.which : e.keyCode); //alert(e.keyCode); if ( regex.test(str) || (e.keyCode>=37 && e.keyCode<=40) || (e.keyCode>=96 && e.keyCode<=105) || e.keyCode==46 || e.keyCode==9 || e.keyCode==173) { return true; } e.preventDefault(); return false; }); //allow to insert only numeric digits in input box jQuery(document).on('keypress keydown', ".onlyNumber",function(e) { var regex = new RegExp("^[0-9\t\b -]+$"); //var str = String.fromCharCode(!e.charCode ? e.which : e.charCode); var str = String.fromCharCode(!e.keyCode ? e.which : e.keyCode); //alert(e.keyCode); if ( regex.test(str) || (e.keyCode>=37 && e.keyCode<=40) || (e.keyCode>=96 && e.keyCode<=105) || e.keyCode==46 || e.keyCode==9) { return true; } e.preventDefault(); return false; }); //allow to insert only alphanumeric digits in input box jQuery(document).on('keypress keydown', ".alphaNumeric", function(e) { var regex = new RegExp("^[a-zA-Z0-9._()/+\t\b -]+$"); //var str = String.fromCharCode(!e.charCode ? e.which : e.charCode); var str = String.fromCharCode(!e.keyCode ? e.which : e.keyCode); //alert(e.keyCode); if (regex.test(str) || (e.keyCode>=37 && e.keyCode<=40) || (e.keyCode>=96 && e.keyCode<=105) || e.keyCode==46 || e.keyCode==9) { return true; } e.preventDefault(); return false; }); // OPEN LAST OPENED TAB /*jQuery('.tabbed-content').tabbedContent({ currentClass: 'current', });*/ var lastOpenTab = window.localStorage['lastOpenTab']; tabapi = jQuery('.tabbed-content').tabbedContent({ currentClass: 'current', history: false, onSwitch: function(tab, api){ window.localStorage['lastOpenTab'] = tab; }, onInit: function(api){ if (window.localStorage['lastOpenTab'] != undefined) { api.switch(lastOpenTab); } } }).data('api'); // TIMEPICKER & DATEPICKER attachDateTimePicker(); // AUTO HIDE NOTICE autohideNotice(); // SLOT MACHINE updateSlotId(); jQuery('.js-add-slot-btn').on('click', function(e){ addSlot(); updateSlotId(); e.preventDefault(); }); /*jQuery(document).on('click', '.js-remove-slot-btn', function(e){ removeSlot(e); updateSlotId(); e.preventDefault(); });*/ }); // document.ready // TIME SLOT FUNCTIONS function addSlot() { var slotCount = jQuery('tr.slot-row').length; jQuery('.time-slot-table > tbody').append('
'+responseResult.data+'
'+responseResult.data+'
Appointment Successfully Deleted
Appointment Successfully Deleted