Know the Benefits of CBD Tea Drinks –

  1. Home
  2. Blog
  3. Know the Benefits of CBD Tea Drinks

Login or Create an account

= 0){ var splitResult = response[key][‘value’].split(‘-/-‘); response[key][‘value’] = splitResult[0]; } } ); } else { response = {error: “null”}; } return response; } } }); var member_searchDataSrc = member_searchEngine.initialize(); member_searchDataSrc .done(function() { /*console.log(‘Autosuggestions engine initialized.’); */}) .fail(function() { /*console.log(‘err, something went wrong while initializing autosuggestions engine:(‘);*/}) $(‘.member_search’).typeahead({ minLength: 1, highlight: true, hint: false }, { display: ‘value’, source: member_searchEngine.ttAdapter(), limit: 10, templates: { empty: [ ”, ‘Result not found’, ” ].join(” “), notFound: [ ”, ‘Result not found’, ” ].join(” “), suggestion: function(data) { if (data == “null”) { strTemplate = ‘Result not found’; } else { strTemplate = ‘

‘ + data.value + ‘

‘ + data.comes_f + ‘

‘ + data.location + ‘ ‘; if ((data.link == undefined) || (data.link == “”) || (data.link == “novalue”)) { strTemplate = strTemplate.replace(/href=”.*?”/, “href=’#'”); } if ((data.photo == undefined) || (data.photo == “”) || (data.photo == “novalue”)) { strTemplate = strTemplate.replace(//, “”); } } return strTemplate; } }, }).on(‘typeahead:selected’, function (obj, datum) { /* console.log(obj); console.log(datum); */ }); $(‘.member_search’).each(function() { var inputWidth = $(this).outerWidth(); $(this).siblings(‘.tt-dropdown-menu’).css(‘width’,inputWidth+’px’); }); }); ]]>

= 0){ var splitResult = response[key][‘value’].split(‘-/-‘); response[key][‘value’] = splitResult[0]; } } ); } else { response = {error: “null”}; } return response; } } }); var global_searchDataSrc = global_searchEngine.initialize(); global_searchDataSrc .done(function() { /*console.log(‘Autosuggestions engine initialized.’); */}) .fail(function() { /*console.log(‘err, something went wrong while initializing autosuggestions engine:(‘);*/}) $(‘.global_search’).typeahead({ minLength: 3, highlight: true, hint: false }, { display: ‘value’, source: global_searchEngine.ttAdapter(), limit: 3, templates: { empty: [ ”, ‘Result not found’, ” ].join(” “), notFound: [ ”, ‘Result not found’, ” ].join(” “), suggestion: function(data) { if (data == “null”) { strTemplate = ‘Result not found’; } else { strTemplate = ‘

‘ + data.value + ‘

‘ + data.comes_f + ‘

‘ + data.location + ‘ ‘; if ((data.link == undefined) || (data.link == “”) || (data.link == “novalue”)) { strTemplate = strTemplate.replace(/href=”.*?”/, “href=’#'”); } if ((data.photo == undefined) || (data.photo == “”) || (data.photo == “novalue”)) { strTemplate = strTemplate.replace(//, “”); } } return strTemplate; } }, }).on(‘typeahead:selected’, function (obj, datum) { /* console.log(obj); console.log(datum); */ }); $(‘.global_search’).each(function() { var inputWidth = $(this).outerWidth(); $(this).siblings(‘.tt-dropdown-menu’).css(‘width’,inputWidth+’px’); }); }); ]]>

‘); } } if(thisObj.hasClass(‘googleSuggest’) && thisObj.val().length == 0){ thisObj.parent().append(‘‘); } if (thisObj.val() == “” && thisObj.parent().find(‘.clear_content’).length){ thisObj.parent().find(‘.clear_content’).remove(); } } $(‘.sm-autosuggest input, .googleSuggest, .large-autosuggest input, .md-autosuggest input, .normal-autosuggest input, .google-writen-location’).keyup(function(){ clearContent($(this)); }); $(document).ready(function(){ $(‘.sm-autosuggest input, input.googleSuggest, .large-autosuggest input, .md-autosuggest input, .normal-autosuggest input, .google-writen-location’).each(function(){ clearContent($(this)); }) }) $(document).on(‘click’, ‘.clear_content’, function(){ $(this).parent().find(‘input’).val(”); clearContent($(this).parent().find(‘input’)); $(this).remove(); }); ]]> 600) { $(‘.scrollup’).fadeIn(); } else { $(‘.scrollup’).fadeOut(); } }); $(‘.scrollup’).click(function(){ $(“html, body”).animate({ scrollTop: 0 }, 600); return false; }); $(‘#cropButton’).click(function(){ var iframe = $(“#cropiFrame”); iframe.attr(“src”, iframe.data(“src”)); }); }); ]]> 0) { $(this).val(formattedAddress.join(‘, ‘)); clearContent($(this)); } } }); } else { $(‘.googleSuggest’).each(function () { $(this).val(”); }); } }); } }; var vlon = ”; var vlat = ”; function showError(error) { switch (error.code) { case error.PERMISSION_DENIED: $(‘.fill_location.clicked’).popover({ content: ‘Your Local browser settings have prevented location targeting’, container: ‘body’}); $(‘.fill_location.clicked’).popover(‘toggle’); setTimeout(function(){ $(‘.fill_location.clicked’).popover(‘hide’); $(‘.fill_location.clicked’).removeClass(‘clicked’); }, 2000); break; case error.POSITION_UNAVAILABLE: console.log(“Location information is unavailable.”); break; case error.TIMEOUT: console.log(“The request to get user location timed out.”); break; case error.UNKNOWN_ERROR: console.log(“An unknown error occurred.”); break; } } if (navigator.geolocation) { if($(“.googleSuggest”)[0]){ $(document).on(‘click’, ‘.fill_location’, function(){ $(this).addClass(‘clicked’); var startPos; navigator.geolocation.getCurrentPosition(function (position) { startPos = position; vlat = startPos.coords.latitude; vlon = startPos.coords.longitude; $.get(“/api/data/html/get/data_widgets/widget_name”, { “vlat”: vlat, “vlon”: vlon, “name”: “Website – Save Coordinates Session” }).done(function (data) { }); populateSearchFields(); }, showError); }) window.onload = function () { }; } } else { console.log(‘Geolocation is not supported for this Browser/OS version yet.’); } ]]> 0){ $(this).prepend(‘‘); $(this).find(‘a’).after(”); $(this).find(‘span’).after(”); } $(this).append(”); }); $(‘.mobile-main-menu .sidebar-nav li i’).click(function(){ if ($(this).parent().children(‘ul’).length > 0){ $(this).parent().toggleClass(‘sub_open’); } if ($(this).hasClass(‘fa-plus’)){ $(this).switchClass(‘fa-plus’,’fa-minus’); } else { $(this).switchClass(‘fa-minus’,’fa-plus’); } }); }) if ($(window).width() > 740 && $(window).width() 0){ $(this).prepend(‘‘); $(this).find(‘a’).after(”); var this_link = $(this).children(‘a’).text().replace(/[^x00-x7F]/g, “”);; $(this).children(‘a’).html(this_link); $(this).find(‘span’).after(”); } $(this).append(”); }); $(‘.tablet-menu .tablet-menu-ul li i’).click(function(){ if ($(this).parent().children(‘ul’).length > 0){ $(this).parent().toggleClass(‘sub_open’); if ($(this).siblings( “ul” ).hasClass(‘tablet-block’)){ $(this).siblings( “ul” ).switchClass(‘tablet-block’, ‘tablet-none’); } else { $(this).siblings( “ul” ).addClass( “tablet-block” ); if ($(this).siblings( “ul” ).hasClass(‘tablet-none’)){ $(this).siblings( “ul” ).removeClass(‘tablet-none’) } if ($(this).parent().siblings().children(‘ul’).hasClass(‘tablet-block’)) { $(this).parent().siblings().children(‘ul’).switchClass(‘tablet-block’, ‘tablet-none’); $(this).parent().siblings().children(‘i’).switchClass(‘fa-minus’,’fa-plus’); } if ($(this).parent().siblings().children(‘ul’).children().children(‘ul’).hasClass(‘tablet-block’)) { $(this).parent().siblings().children(‘ul’).children().children(‘ul’).switchClass(‘tablet-block’, ‘tablet-none’); $(this).parent().siblings().children(‘ul’).children().children(‘i’).switchClass(‘fa-minus’,’fa-plus’); } if ($(this).siblings(‘ul’).children(‘ul’).children().children(‘ul’).hasClass(‘tablet-block’)) { $(this).siblings(‘ul’).children(‘ul’).children().children(‘ul’).switchClass(‘tablet-block’, ‘tablet-none’); $(this).siblings(‘ul’).children(‘ul’).children().children(‘i’).switchClass(‘fa-minus’,’fa-plus’); } } } if ($(this).hasClass(‘fa-plus’)){ $(this).switchClass(‘fa-plus’,’fa-minus’); } else { $(this).switchClass(‘fa-minus’,’fa-plus’); } }); }) } ]]> 0) { $(‘#’ + targetSelect).select2(“open”); } } }, 400); } }); const topRequired = document.querySelector(‘label[for=”top-id-select”] span.required’); const subRequired = document.querySelector(‘label[for=”sub-id-select”] span.required’); const subSubRequired = document.querySelector(‘label[for=”sub-sub-id-select”] span.required’); //code to check that the categories have been submitted if the settings are enabled $(‘#myform’).submit(function (e) { let topRequiredVal = document.getElementById(‘top-id-select’); let subRequiredVal = document.getElementById(‘sub-id-select’); let subSubRequiredVal = document.getElementById(‘sub-sub-id-select’); if ((topRequired !== null && topRequiredVal !== null && topRequiredVal.value == ”) || (subRequired !== null && subRequiredVal !== null && subRequiredVal.value == ”) || (subSubRequired !== null && subSubRequiredVal !== null && subSubRequiredVal.value == ”)) { e.preventDefault(); e.stopPropagation(); e.stopImmediatePropagation(); swal(“Whoops!”, “Please select a category to submit this request”, “error”); } }); ]]>= 0) { notification.html(`Processing Request…`).addClass(“alert-warning”); setTimeout(function(){ fv.defaultSubmit(); }, 100); } else { notification.html(`Processing Request…`).addClass(“alert-warning”); if(counterSubmit == 0) { counterSubmit++; $.ajax({ url: action, type: method, data: values, dataType: return_data_type, success: function (data) { if (return_data_type == “html”) { var result = ‘success’; if (!data != “”) { var result_widget = data[‘result_widget’]; } } else { if (!data[‘result’]) { var result = ‘error’; } else { var result = data[‘result’]; } if (!data[‘result_widget’]) { var result_widget = ”; } else { var result_widget = data[‘result_widget’]; } } if (result == “success”) { if (!data[‘message’]) { var message = `Your information has submitted successfully!`; } else { var message = data[‘message’]; } if (!data[‘redirect_url’]) { var redirect_url = ”; } else { var redirect_url = data[‘redirect_url’]; } if (form_action_type == “notification”) { notification.html(message) .addClass(“alert-success”) .removeClass(“alert-danger”) .removeClass(“alert-warning”) .delay(2000).slideUp(); if(notification.parents(‘.modal’).length && ‘myform’ == ‘whmcs_billing_address’){ setTimeout(function(){ notification.parents(‘.modal’).modal(‘hide’); }, 1000); } } else if (form_action_type == “widget”) { if (result_widget != ”) { setTimeout(function(){ if(form_action_div != ‘.newsletter_modal_form_container’){ $(“html, body”).animate({ scrollTop: 0 }, 600); } $(form_action_div).html(decodeHtml(result_widget)).text(); }, 1000); } } else if (form_action_type == “redirect”) { if (redirect_url == “”) { redirect_url = decodeURIComponent(“”); } if (redirect_url.substring(0, 1) != “/” && redirect_url.substring(0, 1) != “h”) { redirect_url = “/” + redirect_url; } current_location = “/blog/know-the-benefits-of-cbd-tea-drinks”; refresh_pages_string = “/login”; refresh_pages_string = refresh_pages_string.replace(/ /g,”); refresh_pages_array = refresh_pages_string.split(‘,’); notification.html(message) .addClass(“alert-success”) .removeClass(“alert-danger”) .removeClass(“alert-warning”) .delay(2000).slideUp(); if(action == “/api/widget/json/get/Bootstrap%20Theme%20-%20Member%20Login%20Page” && current_location.indexOf(“/login”) == -1 && refresh_pages_string != ” && (!refresh_pages_array.includes(current_location) || refresh_pages_string == “/login” )){ window.location.href = window.location.href+’?logged’; } else { window.location.href = redirect_url; } fv.resetForm(true); } if(form_action_div != ‘.newsletter_modal_form_container’ && ‘myform’ != ‘whmcs_billing_address’){ $(‘.modal-backdrop’).hide(); } } else { if(typeof grecaptcha !== “undefined”){ grecaptcha.reset(); } if (!data[‘message’]) { var message = `You entered invalid data. Please try to save again.`; } else { var message = data[‘message’]; } notification.html(message) .addClass(“alert-danger”) .removeClass(“alert-success”) .removeClass(“alert-warning”) .fadeIn(); fv.disableSubmitButtons(false); } }, error: function (e) { if(typeof grecaptcha !== “undefined”){ grecaptcha.reset(); notification.html(`Recaptcha Error`); } else { notification.html(`A connection error occurred while saving. Please try to save again.`); } notification.addClass(“alert-warning”) .removeClass(“alert-success”) .removeClass(“alert-warning”) .fadeIn(); } });/// End Ajax counterSubmit = 0; } }//END else }).bind(‘keydown’, function(event) { if (event.ctrlKey || event.metaKey) { switch (String.fromCharCode(event.which).toLowerCase()) { case ‘s’: $(this).submit(); break; } } }); /// This will turn any select2 that are required in the form builder to being required elements. $(‘#myform select’).each(function (i, obj) { setTimeout(function(){ if ($(obj).prop(“required”) && $(obj).attr(“style”) == “display: none;”) { $(obj).css(“z-index”,”-999″); $(obj).css(“height”,”0″); $(obj).css(“width”,”0″); $(obj).css(“display”,”block”); $(obj).css(“position”,”absolute”); } }, 3000); }); });//END $(‘# echo $_SERVER[form_element_id]; ‘).formValidation( ]]> .gdpr_consent_email”).show(); }); $(‘#newsletter_signup_footer input[name=”email”]’).on(‘keypress’, function() { $(“#newsletter_signup_footer > .gdpr_consent_email”).show(); }); ]]> 0) { $(this).find(‘input[type=”submit”]’).before(”); } else { $(this).prepend(”); } var notification = $(“#newsletter-notification”); if ((form_action_type == “” || form_action_type == “default”) && action.indexOf(“account”) >= 0) { notification.html(`Processing Request…`).addClass(“alert-warning”); setTimeout(function(){ fv.defaultSubmit(); }, 100); } else { notification.html(`Processing Request…`).addClass(“alert-warning”); if(counterSubmit == 0) { counterSubmit++; $.ajax({ url: action, type: method, data: values, dataType: return_data_type, success: function (data) { if (return_data_type == “html”) { var result = ‘success’; if (!data != “”) { var result_widget = data[‘result_widget’]; } } else { if (!data[‘result’]) { var result = ‘error’; } else { var result = data[‘result’]; } if (!data[‘result_widget’]) { var result_widget = ”; } else { var result_widget = data[‘result_widget’]; } } if (result == “success”) { if (!data[‘message’]) { var message = `Your information has submitted successfully!`; } else { var message = data[‘message’]; } if (!data[‘redirect_url’]) { var redirect_url = ”; } else { var redirect_url = data[‘redirect_url’]; } if (form_action_type == “notification”) { notification.html(message) .addClass(“alert-success”) .removeClass(“alert-danger”) .removeClass(“alert-warning”) .delay(2000).slideUp(); if(notification.parents(‘.modal’).length && ‘newsletter’ == ‘whmcs_billing_address’){ setTimeout(function(){ notification.parents(‘.modal’).modal(‘hide’); }, 1000); } } else if (form_action_type == “widget”) { if (result_widget != ”) { setTimeout(function(){ if(form_action_div != ‘.newsletter_modal_form_container’){ $(“html, body”).animate({ scrollTop: 0 }, 600); } $(form_action_div).html(decodeHtml(result_widget)).text(); }, 1000); } } else if (form_action_type == “redirect”) { if (redirect_url == “”) { redirect_url = decodeURIComponent(“”); } if (redirect_url.substring(0, 1) != “/” && redirect_url.substring(0, 1) != “h”) { redirect_url = “/” + redirect_url; } current_location = “/blog/know-the-benefits-of-cbd-tea-drinks”; refresh_pages_string = “/login”; refresh_pages_string = refresh_pages_string.replace(/ /g,”); refresh_pages_array = refresh_pages_string.split(‘,’); notification.html(message) .addClass(“alert-success”) .removeClass(“alert-danger”) .removeClass(“alert-warning”) .delay(2000).slideUp(); if(action == “/api/widget/json/get/Bootstrap%20Theme%20-%20Member%20Login%20Page” && current_location.indexOf(“/login”) == -1 && refresh_pages_string != ” && (!refresh_pages_array.includes(current_location) || refresh_pages_string == “/login” )){ window.location.href = window.location.href+’?logged’; } else { window.location.href = redirect_url; } fv.resetForm(true); } if(form_action_div != ‘.newsletter_modal_form_container’ && ‘newsletter’ != ‘whmcs_billing_address’){ $(‘.modal-backdrop’).hide(); } } else { if(typeof grecaptcha !== “undefined”){ grecaptcha.reset(); } if (!data[‘message’]) { var message = `You entered invalid data. Please try to save again.`; } else { var message = data[‘message’]; } notification.html(message) .addClass(“alert-danger”) .removeClass(“alert-success”) .removeClass(“alert-warning”) .fadeIn(); fv.disableSubmitButtons(false); } }, error: function (e) { if(typeof grecaptcha !== “undefined”){ grecaptcha.reset(); notification.html(`Recaptcha Error`); } else { notification.html(`A connection error occurred while saving. Please try to save again.`); } notification.addClass(“alert-warning”) .removeClass(“alert-success”) .removeClass(“alert-warning”) .fadeIn(); } });/// End Ajax counterSubmit = 0; } }//END else }).bind(‘keydown’, function(event) { if (event.ctrlKey || event.metaKey) { switch (String.fromCharCode(event.which).toLowerCase()) { case ‘s’: $(this).submit(); break; } } }); /// This will turn any select2 that are required in the form builder to being required elements. $(‘#newsletter select’).each(function (i, obj) { setTimeout(function(){ if ($(obj).prop(“required”) && $(obj).attr(“style”) == “display: none;”) { $(obj).css(“z-index”,”-999″); $(obj).css(“height”,”0″); $(obj).css(“width”,”0″); $(obj).css(“display”,”block”); $(obj).css(“position”,”absolute”); } }, 3000); }); });//END $(‘# echo $_SERVER[form_element_id]; ‘).formValidation( ]]>

Join our Mailing List to Receive Marketing Tips

0) { $(this).find(‘input[type=”submit”]’).before(”); } else { $(this).prepend(”); } var notification = $(“#newsletter3-notification”); if ((form_action_type == “” || form_action_type == “default”) && action.indexOf(“account”) >= 0) { notification.html(`Processing Request…`).addClass(“alert-warning”); setTimeout(function(){ fv.defaultSubmit(); }, 100); } else { notification.html(`Processing Request…`).addClass(“alert-warning”); if(counterSubmit == 0) { counterSubmit++; $.ajax({ url: action, type: method, data: values, dataType: return_data_type, success: function (data) { if (return_data_type == “html”) { var result = ‘success’; if (!data != “”) { var result_widget = data[‘result_widget’]; } } else { if (!data[‘result’]) { var result = ‘error’; } else { var result = data[‘result’]; } if (!data[‘result_widget’]) { var result_widget = ”; } else { var result_widget = data[‘result_widget’]; } } if (result == “success”) { if (!data[‘message’]) { var message = `Your information has submitted successfully!`; } else { var message = data[‘message’]; } if (!data[‘redirect_url’]) { var redirect_url = ”; } else { var redirect_url = data[‘redirect_url’]; } if (form_action_type == “notification”) { notification.html(message) .addClass(“alert-success”) .removeClass(“alert-danger”) .removeClass(“alert-warning”) .delay(2000).slideUp(); if(notification.parents(‘.modal’).length && ‘newsletter3’ == ‘whmcs_billing_address’){ setTimeout(function(){ notification.parents(‘.modal’).modal(‘hide’); }, 1000); } } else if (form_action_type == “widget”) { if (result_widget != ”) { setTimeout(function(){ if(form_action_div != ‘.newsletter_modal_form_container’){ $(“html, body”).animate({ scrollTop: 0 }, 600); } $(form_action_div).html(decodeHtml(result_widget)).text(); }, 1000); } } else if (form_action_type == “redirect”) { if (redirect_url == “”) { redirect_url = decodeURIComponent(“”); } if (redirect_url.substring(0, 1) != “/” && redirect_url.substring(0, 1) != “h”) { redirect_url = “/” + redirect_url; } current_location = “/blog/know-the-benefits-of-cbd-tea-drinks”; refresh_pages_string = “/login”; refresh_pages_string = refresh_pages_string.replace(/ /g,”); refresh_pages_array = refresh_pages_string.split(‘,’); notification.html(message) .addClass(“alert-success”) .removeClass(“alert-danger”) .removeClass(“alert-warning”) .delay(2000).slideUp(); if(action == “/api/widget/json/get/Bootstrap%20Theme%20-%20Member%20Login%20Page” && current_location.indexOf(“/login”) == -1 && refresh_pages_string != ” && (!refresh_pages_array.includes(current_location) || refresh_pages_string == “/login” )){ window.location.href = window.location.href+’?logged’; } else { window.location.href = redirect_url; } fv.resetForm(true); } if(form_action_div != ‘.newsletter_modal_form_container’ && ‘newsletter3’ != ‘whmcs_billing_address’){ $(‘.modal-backdrop’).hide(); } } else { if(typeof grecaptcha !== “undefined”){ grecaptcha.reset(); } if (!data[‘message’]) { var message = `You entered invalid data. Please try to save again.`; } else { var message = data[‘message’]; } notification.html(message) .addClass(“alert-danger”) .removeClass(“alert-success”) .removeClass(“alert-warning”) .fadeIn(); fv.disableSubmitButtons(false); } }, error: function (e) { if(typeof grecaptcha !== “undefined”){ grecaptcha.reset(); notification.html(`Recaptcha Error`); } else { notification.html(`A connection error occurred while saving. Please try to save again.`); } notification.addClass(“alert-warning”) .removeClass(“alert-success”) .removeClass(“alert-warning”) .fadeIn(); } });/// End Ajax counterSubmit = 0; } }//END else }).bind(‘keydown’, function(event) { if (event.ctrlKey || event.metaKey) { switch (String.fromCharCode(event.which).toLowerCase()) { case ‘s’: $(this).submit(); break; } } }); /// This will turn any select2 that are required in the form builder to being required elements. $(‘#newsletter3 select’).each(function (i, obj) { setTimeout(function(){ if ($(obj).prop(“required”) && $(obj).attr(“style”) == “display: none;”) { $(obj).css(“z-index”,”-999″); $(obj).css(“height”,”0″); $(obj).css(“width”,”0″); $(obj).css(“display”,”block”); $(obj).css(“position”,”absolute”); } }, 3000); }); });//END $(‘# echo $_SERVER[form_element_id]; ‘).formValidation( ]]> Please log in to access this website.’; var errorMsg = ‘ The email address or password is not valid.’; var passErrorMsg = ‘ The email address entered does not exist.’; if (retrievalUrl == ‘retrieval’ ) { $(‘li.tab1’).removeClass(‘active’); $(‘li.tab2’).addClass(‘active’); } $(‘#showMessage’).on(‘click’,function() { $(‘#showMessage’).html(”); }); if ( errorUrl == ‘The%20email%20address%20you%20entered%20does%20not%20match%20our%20records.’) { $(‘#showMessage’).html(passErrorMsg); $(‘li.active’).removeClass(‘active’); $(‘li.notActive’).removeClass(‘notActive’).addClass(‘active’); } if ( errorUrl == ‘You%20must%20be%20logged%20in%20to%20access%20this%20page’) { $(‘#showMessage’).html(warningMsg); $(‘li.active’).removeClass(‘active’); $(‘li.notActive’).removeClass(‘notActive’).addClass(‘active’); } ]]> 0) { $(this).find(‘input[type=”submit”]’).before(”); } else { $(this).prepend(”); } var notification = $(“#member_login-notification”); if ((form_action_type == “” || form_action_type == “default”) && action.indexOf(“account”) >= 0) { notification.html(`Processing Request…`).addClass(“alert-warning”); setTimeout(function(){ fv.defaultSubmit(); }, 100); } else { notification.html(`Processing Request…`).addClass(“alert-warning”); if(counterSubmit == 0) { counterSubmit++; $.ajax({ url: action, type: method, data: values, dataType: return_data_type, success: function (data) { if (return_data_type == “html”) { var result = ‘success’; if (!data != “”) { var result_widget = data[‘result_widget’]; } } else { if (!data[‘result’]) { var result = ‘error’; } else { var result = data[‘result’]; } if (!data[‘result_widget’]) { var result_widget = ”; } else { var result_widget = data[‘result_widget’]; } } if (result == “success”) { if (!data[‘message’]) { var message = `Your information has submitted successfully!`; } else { var message = data[‘message’]; } if (!data[‘redirect_url’]) { var redirect_url = ”; } else { var redirect_url = data[‘redirect_url’]; } if (form_action_type == “notification”) { notification.html(message) .addClass(“alert-success”) .removeClass(“alert-danger”) .removeClass(“alert-warning”) .delay(2000).slideUp(); if(notification.parents(‘.modal’).length && ‘member_login’ == ‘whmcs_billing_address’){ setTimeout(function(){ notification.parents(‘.modal’).modal(‘hide’); }, 1000); } } else if (form_action_type == “widget”) { if (result_widget != ”) { setTimeout(function(){ if(form_action_div != ‘.newsletter_modal_form_container’){ $(“html, body”).animate({ scrollTop: 0 }, 600); } $(form_action_div).html(decodeHtml(result_widget)).text(); }, 1000); } } else if (form_action_type == “redirect”) { if (redirect_url == “”) { redirect_url = decodeURIComponent(“”); } if (redirect_url.substring(0, 1) != “/” && redirect_url.substring(0, 1) != “h”) { redirect_url = “/” + redirect_url; } current_location = “/blog/know-the-benefits-of-cbd-tea-drinks”; refresh_pages_string = “/login”; refresh_pages_string = refresh_pages_string.replace(/ /g,”); refresh_pages_array = refresh_pages_string.split(‘,’); notification.html(message) .addClass(“alert-success”) .removeClass(“alert-danger”) .removeClass(“alert-warning”) .delay(2000).slideUp(); if(action == “/api/widget/json/get/Bootstrap%20Theme%20-%20Member%20Login%20Page” && current_location.indexOf(“/login”) == -1 && refresh_pages_string != ” && (!refresh_pages_array.includes(current_location) || refresh_pages_string == “/login” )){ window.location.href = window.location.href+’?logged’; } else { window.location.href = redirect_url; } fv.resetForm(true); } if(form_action_div != ‘.newsletter_modal_form_container’ && ‘member_login’ != ‘whmcs_billing_address’){ $(‘.modal-backdrop’).hide(); } } else { if(typeof grecaptcha !== “undefined”){ grecaptcha.reset(); } if (!data[‘message’]) { var message = `You entered invalid data. Please try to save again.`; } else { var message = data[‘message’]; } notification.html(message) .addClass(“alert-danger”) .removeClass(“alert-success”) .removeClass(“alert-warning”) .fadeIn(); fv.disableSubmitButtons(false); } }, error: function (e) { if(typeof grecaptcha !== “undefined”){ grecaptcha.reset(); notification.html(`Recaptcha Error`); } else { notification.html(`A connection error occurred while saving. Please try to save again.`); } notification.addClass(“alert-warning”) .removeClass(“alert-success”) .removeClass(“alert-warning”) .fadeIn(); } });/// End Ajax counterSubmit = 0; } }//END else }).bind(‘keydown’, function(event) { if (event.ctrlKey || event.metaKey) { switch (String.fromCharCode(event.which).toLowerCase()) { case ‘s’: $(this).submit(); break; } } }); /// This will turn any select2 that are required in the form builder to being required elements. $(‘#member_login select’).each(function (i, obj) { setTimeout(function(){ if ($(obj).prop(“required”) && $(obj).attr(“style”) == “display: none;”) { $(obj).css(“z-index”,”-999″); $(obj).css(“height”,”0″); $(obj).css(“width”,”0″); $(obj).css(“display”,”block”); $(obj).css(“position”,”absolute”); } }, 3000); }); });//END $(‘# echo $_SERVER[form_element_id]; ‘).formValidation( ]]> 0) { $(this).find(‘input[type=”submit”]’).before(”); } else { $(this).prepend(”); } var notification = $(“#member_login5-notification”); if ((form_action_type == “” || form_action_type == “default”) && action.indexOf(“account”) >= 0) { notification.html(`Processing Request…`).addClass(“alert-warning”); setTimeout(function(){ fv.defaultSubmit(); }, 100); } else { notification.html(`Processing Request…`).addClass(“alert-warning”); if(counterSubmit == 0) { counterSubmit++; $.ajax({ url: action, type: method, data: values, dataType: return_data_type, success: function (data) { if (return_data_type == “html”) { var result = ‘success’; if (!data != “”) { var result_widget = data[‘result_widget’]; } } else { if (!data[‘result’]) { var result = ‘error’; } else { var result = data[‘result’]; } if (!data[‘result_widget’]) { var result_widget = ”; } else { var result_widget = data[‘result_widget’]; } } if (result == “success”) { if (!data[‘message’]) { var message = `Your information has submitted successfully!`; } else { var message = data[‘message’]; } if (!data[‘redirect_url’]) { var redirect_url = ”; } else { var redirect_url = data[‘redirect_url’]; } if (form_action_type == “notification”) { notification.html(message) .addClass(“alert-success”) .removeClass(“alert-danger”) .removeClass(“alert-warning”) .delay(2000).slideUp(); if(notification.parents(‘.modal’).length && ‘member_login5’ == ‘whmcs_billing_address’){ setTimeout(function(){ notification.parents(‘.modal’).modal(‘hide’); }, 1000); } } else if (form_action_type == “widget”) { if (result_widget != ”) { setTimeout(function(){ if(form_action_div != ‘.newsletter_modal_form_container’){ $(“html, body”).animate({ scrollTop: 0 }, 600); } $(form_action_div).html(decodeHtml(result_widget)).text(); }, 1000); } } else if (form_action_type == “redirect”) { if (redirect_url == “”) { redirect_url = decodeURIComponent(“”); } if (redirect_url.substring(0, 1) != “/” && redirect_url.substring(0, 1) != “h”) { redirect_url = “/” + redirect_url; } current_location = “/blog/know-the-benefits-of-cbd-tea-drinks”; refresh_pages_string = “/login”; refresh_pages_string = refresh_pages_string.replace(/ /g,”); refresh_pages_array = refresh_pages_string.split(‘,’); notification.html(message) .addClass(“alert-success”) .removeClass(“alert-danger”) .removeClass(“alert-warning”) .delay(2000).slideUp(); if(action == “/api/widget/json/get/Bootstrap%20Theme%20-%20Member%20Login%20Page” && current_location.indexOf(“/login”) == -1 && refresh_pages_string != ” && (!refresh_pages_array.includes(current_location) || refresh_pages_string == “/login” )){ window.location.href = window.location.href+’?logged’; } else { window.location.href = redirect_url; } fv.resetForm(true); } if(form_action_div != ‘.newsletter_modal_form_container’ && ‘member_login5’ != ‘whmcs_billing_address’){ $(‘.modal-backdrop’).hide(); } } else { if(typeof grecaptcha !== “undefined”){ grecaptcha.reset(); } if (!data[‘message’]) { var message = `You entered invalid data. Please try to save again.`; } else { var message = data[‘message’]; } notification.html(message) .addClass(“alert-danger”) .removeClass(“alert-success”) .removeClass(“alert-warning”) .fadeIn(); fv.disableSubmitButtons(false); } }, error: function (e) { if(typeof grecaptcha !== “undefined”){ grecaptcha.reset(); notification.html(`Recaptcha Error`); } else { notification.html(`A connection error occurred while saving. Please try to save again.`); } notification.addClass(“alert-warning”) .removeClass(“alert-success”) .removeClass(“alert-warning”) .fadeIn(); } });/// End Ajax counterSubmit = 0; } }//END else }).bind(‘keydown’, function(event) { if (event.ctrlKey || event.metaKey) { switch (String.fromCharCode(event.which).toLowerCase()) { case ‘s’: $(this).submit(); break; } } }); /// This will turn any select2 that are required in the form builder to being required elements. $(‘#member_login5 select’).each(function (i, obj) { setTimeout(function(){ if ($(obj).prop(“required”) && $(obj).attr(“style”) == “display: none;”) { $(obj).css(“z-index”,”-999″); $(obj).css(“height”,”0″); $(obj).css(“width”,”0″); $(obj).css(“display”,”block”); $(obj).css(“position”,”absolute”); } }, 3000); }); });//END $(‘# echo $_SERVER[form_element_id]; ‘).formValidation( ]]> 0) { if (countryCode == “CA” || countryCode == “CR”) { result = “Province”; flag = ““; } else if (countryCode == “UK”) { result = “Region”; flag = ““; } else if (countryCode == “US”) { result = “Zip Code”; flag = ““; } else { result = ” “; document.getElementById(‘state’).disabled = false; flag = ““; } document.getElementById(‘byregion’).innerHTML = result; document.getElementById(‘sflag’).innerHTML = flag; if (countryCode == “US”) { document.getElementById(‘zipcode’).style.visibility = ‘visible’; document.getElementById(‘state’).style.visibility = ‘hidden’; document.getElementById(‘state’).style.display = ‘none’; document.getElementById(‘zipcode’).style.display = ‘block’; } else { document.getElementById(‘zipcode’).style.visibility = ‘hidden’; document.getElementById(‘state’).style.visibility = ‘visible’; document.getElementById(‘state’).style.display = ‘block’; document.getElementById(‘zipcode’).value = ”; document.getElementById(‘zipcode’).style.display = ‘none’; } var index = ajax.length; ajax[index] = new sack(); ajax[index].requestFile = ‘/getStateList.php?statetype=code&category=’+countryCode; // Specifying which file to get ajax[index].onCompletion = function(){ createCities(index) }; // Specify function that will be executed after file has been found ajax[index].runAJAX(); // Execute AJAX function } } function getCityListSearch(sel) { var countryCode = sel; var result = ”; document.getElementById(‘state’).options.length = 0; // Empty city select box if (countryCode.length > 0) { if (countryCode == “CA” || countryCode == “CR”) { document.getElementById(‘zipsearch’).style.visibility = ‘collapse’; document.getElementById(‘zipsearch’).style.height = ‘0px’; document.getElementById(‘statesearch’).style.visibility = ‘visible’; document.getElementById(‘statesearch’).style.height = ’62px’; document.getElementById(‘zipcode’).value = ”; result = “Province”; flag = ““; } else if (countryCode == “UK”) { document.getElementById(‘zipsearch’).style.visibility = ‘collapse’; document.getElementById(‘zipsearch’).style.height = ‘0px’; document.getElementById(‘statesearch’).style.visibility = ‘visible’; document.getElementById(‘statesearch’).style.height = ’62px’; document.getElementById(‘zipcode’).value = ”; result = “Region”; flag = ““; } else if (countryCode == “US”) { result = ” “; document.getElementById(‘statesearch’).style.visibility = ‘collapse’; document.getElementById(‘statesearch’).style.height = ‘0px’; document.getElementById(‘zipsearch’).style.visibility = ‘visible’; document.getElementById(‘zipsearch’).style.height = ‘112px’; result = “Zip Code”; flag = ““; } else { result = ” “; document.getElementById(‘zipsearch’).style.visibility = ‘collapse’; document.getElementById(‘zipsearch’).style.height = ‘0px’; document.getElementById(‘statesearch’).style.visibility = ‘collapse’; document.getElementById(‘statesearch’).style.height = ‘0px’; document.getElementById(‘zipcode’).value = ”; flag = ““; } document.getElementById(‘byregion’).innerHTML = result; document.getElementById(‘sflag’).innerHTML = flag; var index = ajax.length; ajax[index] = new sack(); ajax[index].requestFile = ‘/getStateList.php?type=account&statetype=code&category=’+countryCode; // Specifying which file to get ajax[index].onCompletion = function(){ createCities(index) }; // Specify function that will be executed after file has been found ajax[index].runAJAX(); // Execute AJAX function } } function getCityListAccount(sel) { var countryCode = sel; var result = ”; document.getElementById(‘state’).options.length = 0; // Empty city select box if (countryCode == “CA”) { result = “Province”; } else if (countryCode == “UK”) { result = “Region”; } else if (countryCode == “US” || countryCode == “AU”) { result = “State”; } else { result = “Region”; } if (result != “”) { $(“#state”).prev(‘.control-label’).text(result); } if (countryCode.length > 0){ var index = ajax.length; ajax[index] = new sack(); ajax[index].requestFile = ‘/getStateList.php?type=account&statetype=code&category=’ + countryCode; // Specifying which file to get ajax[index].onCompletion = function(){ createCities(index) }; // Specify function that will be executed after file has been found ajax[index].runAJAX(); // Execute AJAX function } } function getCityListPayment(sel) { var countryCode = sel; var result = ”; document.getElementById(‘state’).options.length = 0; // Empty city select box if(countryCode.length > 0){ if (countryCode == “CA”) { result = “Province”; document.getElementById(‘state’).disabled = false; } else if (countryCode == “UK”) { result = “Region”; document.getElementById(‘state’).disabled = false; } else if (countryCode == “US” || countryCode == “AU”) { result = “State”; document.getElementById(‘state’).disabled = false; } else { result = “Region”; } document.getElementById(‘byregion’).innerHTML = result; var index = ajax.length; ajax[index] = new sack(); ajax[index].requestFile = ‘/getStateList.php?nota=1&statetype=code&category=’+countryCode; // Specifying which file to get ajax[index].onCompletion = function(){ createCities(index) }; // Specify function that will be executed after file has been found ajax[index].runAJAX(); // Execute AJAX function } } function createCities(index) { var obj = document.getElementById(‘state’); eval(ajax[index].response); // Executing the response from Ajax as Javascript code } ]]> 1) { $(“#” + div).select2(“enable”,true); $(“#” + div).html(options); $(“#” + div).select2(“val”, “”); $(“#” + div).select2(“open”); } else { $(“#”+div).select2(“data”, { id: “”, text: “No Options Available” }); $(“#”+div).select2(“val”, “”); } } }); } function getSecondLevelAccount(div,id) { $(“#” + div).select2(“data”, { id: “”, text: “Loading…” }); $.ajax({ url : ‘/ajaxsearch/get-services’, type : “GET”, data : { ‘specialty_id’ : id }, dataType: “json”, success : function(data) { var options = ”; for (var i = 0; i < data.length; i++) { options += '' + data[i].title + ''; } if (data.length > 1) { $(“#” + div).select2(“close”); $(“#” + div).select2(“val”, “”); $(“#” + div).select2(“enable”,true); $(“#” + div).html(options); } else { $(“#”+div).select2(“data”, { id: “”, text: “No Options Available” }); $(“#”+div).select2(“val”, “”); } } }); } function getThirdLevel(div,id,id2) { $(“#”+div).select2(“data”, { id: “”, text: “Loading…” }); $.ajax({ url : ‘/ajaxsearch/get-locations’, type : “GET”, data : { ‘specialty_id’ : id, ‘treatment_id’ : id2, }, dataType: “json”, success : function(data) { var options = ”; for (var i = 0; i < data.length; i++) { options += '' + data[i].title + ''; } if (data.length > 1) { $(“#” + div).select2(“enable”,true); $(“#” + div).html(options); $(“#” + div).select2(“val”, “”); $(“#” + div).select2(“open”); } else { $(“#”+div).select2(“data”, { id: “”, text: “No Options Available” }); $(“#”+div).select2(“val”, “”); } } }); } function getStateList(div,id) { $(“#”+div).select2(“data”, { id: “”, text: “Loading…” }); $.ajax({ url : ‘/ajaxsearch/get-states’, type : “GET”, data : { ‘country’ : id }, dataType: “json”, success : function(data) { var options = ”; for (var i = 0; i < data.length; i++) { options += '' + data[i].title + ''; } if (data.length > 1) { $(“#” + div).select2(“enable”,true); $(“#” + div).html(options); $(“#” + div).select2(“val”, “”); $(“#” + div).select2(“open”); } } }); } function getInfinityChained(div,id) { $(“#”+div).select2(“data”, { id: “”, text: “Loading…” }); $.ajax({ url : ‘/ajaxsearch/get-subcategory’, type : “GET”, data : { ‘parent’ : id }, dataType: “json”, success : function(data) { var options = ”; for (var i = 0; i < data.length; i++) { options += '' + data[i].title + ''; } if (data.length > 1) { $(“#” + div).select2(“enable”,true); $(“#” + div).html(options); if(div == ‘tid’ && ” != ”){ $(“#” + div).select2(“val”, “”); } else { $(“#” + div).select2(“val”, “”); } $(“#” + div).select2(“open”); } else { $(“#” + div).select2(“data”, { id: “”, text: “No Options Available” }); } } }); } function categoryChained(div,id) { $(“#” + div).select2(“data”, { id: “”, text: “Loading…” }); if(div == “tid”){ url_link = ‘/ajaxsearch/get-services’ data_passed = {‘specialty_id’ : id} } else { url_link = ‘/ajaxsearch/category-list’; data_passed = {‘parent’ : id} ; } $.ajax({ url : url_link, type : “GET”, data : data_passed, dataType: “json”, success : function(data) { var options = ”; for (var i = 0; i < data.length; i++) { options += '' + data[i].title + ''; } if (data.length > 1) { $(“#” + div).select2(“enable”,true); $(“#” + div).html(options); $(“#” + div).select2(“val”, “”); $(“#” + div).select2(“open”); } else { $(“#” + div).select2(“data”, { id: “”, text: “No Options Available” }); } } }); } $(“#bd-chained”).select2({ title: “Select An Option”, placeholder: “Select An Option”, allowClear: true, formatNoMatches: function () { return “No matches found”; } }).change(function () { var id = $(this).val(); $(“#tid”).select2(“enable”,false); getInfinityChained(“tid”,id); $(“#tid”).select2(“open”); }); $(“#category-chained”).select2({ title: “Select An Option”, placeholder: “Select An Option”, allowClear: true }).change(function () { var id = $(this).val(); $(“#subcategory-chained”).select2(“enable”,false); categoryChained(“subcategory-chained”,id); $(“#subcategory-chained”).select2(“open”); }); $(“.infinite-chained”).select2({ title: “Select option from list”, placeholder: “Click to select an option”, allowClear: true, formatNoMatches: function () { return “No matches found”; } }).change(function () { var id = $(this).val(); var attr = $(this).attr(‘next’); if (typeof attr !== ‘undefined’ && attr !== false) { $(“#” + attr).select2(“enable”,false); categoryChained(attr,id); $(“#” + attr).select2(“open”); } }); $(“#subcategory-chained”).select2(); $(“.combobox”).select2(); $(“.search-chained”).select2(); $(“#country-chained”).select2({ title: “”, placeholder: “”, val: “”, allowClear: true, formatNoMatches: function () { return “No matches found”; } }).change(function () { var id = $(this).val(); $(“#state-chained”).select2(“enable”,false); getStateList(“state-chained”,id); var state = “”; if (id == “CA”) { state = “Province”; } else if (id == “UK”) { state = “Region”; } else if (id == “US” || id == “AU”) { state = “State”; } else { state = “Region”; } $(“#state-chained”).prev(“.control-label”).text(state); }); $(“#state-chained”).select2(); $(“#country-chained-2”).select2({ title: “Select Country”, placeholder: “(select country)”, val: “”, allowClear: true, formatNoMatches: function () { return “No matches found”; } }).change(function () { var id = $(this).val(); $(“#state-chained-2”).select2(“enable”,false); getStateList(“state-chained-2”,id); var state = “”; if (id == “CA”) { state = “Province”; } else if (id == “UK”) { state = “Region”; } else if (id == “US” || id == “AU”) { state = “State”; } else { state = “Region”; } $(“#state-chained-2”).prev(“.control-label”).text(state); }); $(“#state-chained-2”).select2(); $(“#profession_id”).select2({ placeholder: “Select From List”, allowClear: true, formatNoMatches: function () { return “No matches found”; } }).change(function () { var id = $(this).val(); getSecondLevelAccount(“category_id”,id); $(“#category_id”).select2(“open”); }); $(“#sid”).select2({ title: “Select An Option”, placeholder: “Select An Option”, allowClear: true, formatNoMatches: function () { return “No matches found”; } }).change(function () { var id = $(this).val(); $(“#tid”).select2(“enable”,false); getSecondLevel(“tid”,id); $(“#tid”).select2(“open”); }); $(“#location_value_dropdown”).select2({ title: “(optional)”, placeholder: “(optional)”, allowClear: true, formatNoMatches: function () { return “No matches found”; } }); $(“#tid”).select2({ title: “Select An Option”, placeholder: “Select An Option”, allowClear: true, formatNoMatches: function () { return “No matches found”; } }); $(“#location_value_dropdown”).select2({ title: “(optional)”, placeholder: “(optional)”, allowClear: true }); }); ]]> 57){var value=$(this).val();if($.inArray(“-“,value.split(“”))!==0&&negative&&key==45&&(value.length===0||parseInt($.fn.getSelectionStart(this),10)===0)){return true}if(decimal&&key==decimal.charCodeAt(0)&&$.inArray(decimal,value.split(“”))!=-1){allow=false}if(key!=8&&key!=9&&key!=13&&key!=35&&key!=36&&key!=37&&key!=39&&key!=46){allow=false}else{if(typeof e.charCode!=”undefined”){if(e.keyCode==e.which&&e.which!==0){allow=true;if(e.which==46){allow=false}}else if(e.keyCode!==0&&e.charCode===0&&e.which===0){allow=true}}}if(decimal&&key==decimal.charCodeAt(0)){if($.inArray(decimal,value.split(“”))==-1){allow=true}else{allow=false}}}else{allow=true;if(decimal&&decimalPlaces>0){var dot=$.inArray(decimal,$(this).val().split(“”));if(dot>=0&&$(this).val().length>dot+decimalPlaces){allow=false}}}return allow};$.fn.numeric.keyup=function(e){var val=$(this).val();if(val&&val.length>0){var carat=$.fn.getSelectionStart(this);var selectionEnd=$.fn.getSelectionEnd(this);var decimal=$.data(this,”numeric.decimal”);var negative=$.data(this,”numeric.negative”);var decimalPlaces=$.data(this,”numeric.decimalPlaces”);if(decimal!==””&&decimal!==null){var dot=$.inArray(decimal,val.split(“”));if(dot===0){this.value=”0″+val;carat++;selectionEnd++}if(dot==1&&val.charAt(0)==”-“){this.value=”-0″+val.substring(1);carat++;selectionEnd++}val=this.value}var validChars=[0,1,2,3,4,5,6,7,8,9,”-“,decimal];var length=val.length;for(var i=length-1;i>=0;i–){var ch=val.charAt(i);if(i!==0&&ch==”-“){val=val.substring(0,i)+val.substring(i+1)}else if(i===0&&!negative&&ch==”-“){val=val.substring(1)}var validChar=false;for(var j=0;j0){for(var k=length-1;k>firstDecimal;k–){var chch=val.charAt(k);if(chch==decimal){val=val.substring(0,k)+val.substring(k+1)}}}if(decimal&&decimalPlaces>0){var dot=$.inArray(decimal,val.split(“”));if(dot>=0){val=val.substring(0,dot+decimalPlaces+1);selectionEnd=Math.min(val.length,selectionEnd)}}this.value=val;$.fn.setSelection(this,[carat,selectionEnd])}};$.fn.numeric.blur=function(){var decimal=$.data(this,”numeric.decimal”);var callback=$.data(this,”numeric.callback”);var negative=$.data(this,”numeric.negative”);var val=this.value;if(val!==””){var re=new RegExp(“^” + (negative?”-?”:””) + “d+$|^” + (negative?”-?”:””) + “d*” + decimal + “d+$”);if(!re.exec(val)){callback.apply(this)}}};$.fn.removeNumeric=function(){return this.data(“numeric.decimal”,null).data(“numeric.negative”,null).data(“numeric.callback”,null).data(“numeric.decimalPlaces”,null).unbind(“keypress”,$.fn.numeric.keypress).unbind(“keyup”,$.fn.numeric.keyup).unbind(“blur”,$.fn.numeric.blur)};$.fn.getSelectionStart=function(o){if(o.type===”number”){return undefined}else if(o.createTextRange&&document.selection){var r=document.selection.createRange().duplicate();r.moveEnd(“character”,o.value.length);if(r.text==””)return o.value.length;return Math.max(0,o.value.lastIndexOf(r.text))}else{try{return o.selectionStart}catch(e){return 0}}};$.fn.getSelectionEnd=function(o){if(o.type===”number”){return undefined}else if(o.createTextRange&&document.selection){var r=document.selection.createRange().duplicate();r.moveStart(“character”,-o.value.length);return r.text.length}else return o.selectionEnd};$.fn.setSelection=function(o,p){if(typeof p==”number”){p=[p,p]}if(p&&p.constructor==Array&&p.length==2){if(o.type===”number”){o.focus()}else if(o.createTextRange){var r=o.createTextRange();r.collapse(true);r.moveStart(“character”,p[0]);r.moveEnd(“character”,p[1]-p[0]);r.select()}else{o.focus();try{if(o.setSelectionRange){o.setSelectionRange(p[0],p[1])}}catch(e){}}}}})); $(“input.justNumbers”).numeric(); ]]>

Source