/** * This file has been EDITED from the original library version. * the .caret() function has been renamed to .maskCaret() to avoid conflicts with another library. */ !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){var t,n=navigator.userAgent,a=/iphone/i.test(n),i=/chrome/i.test(n),r=/android/i.test(n);e.mask={definitions:{9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},autoclear:!0,dataName:"rawMaskFn",placeholder:"_"},e.fn.extend({maskCaret:function(e,t){var n;return 0===this.length||this.is(":hidden")?void 0:"number"==typeof e?(t="number"==typeof t?t:e,this.each(function(){this.setSelectionRange?this.setSelectionRange(e,t):this.createTextRange&&(n=this.createTextRange(),n.collapse(!0),n.moveEnd("character",t),n.moveStart("character",e),n.select())})):(this[0].setSelectionRange?(e=this[0].selectionStart,t=this[0].selectionEnd):document.selection&&document.selection.createRange&&(n=document.selection.createRange(),e=0-n.duplicate().moveStart("character",-1e5),t=e+n.text.length),{begin:e,end:t})},unmask:function(){return this.trigger("unmask")},mask:function(n,o){var c,l,u,f,s,g,h,m;if(!n&&this.length>0){c=e(this[0]);var d=c.data(e.mask.dataName);return d?d():void 0}return o=e.extend({autoclear:e.mask.autoclear,placeholder:e.mask.placeholder,completed:null},o),l=e.mask.definitions,u=[],f=h=n.length,s=null,e.each(n.split(""),function(e,t){"?"==t?(h--,f=e):l[t]?(u.push(new RegExp(l[t])),null===s&&(s=u.length-1),f>e&&(g=u.length-1)):u.push(null)}),this.trigger("unmask").each(function(){function c(){if(o.completed)for(var e=s;g>=e;e++)u[e]&&C[e]===d(e)&&console.log("reset");else;}function d(e){return o.placeholder.charAt(e=0&&!u[e];);return e}function b(e,t){var n,a;if(!(0>e)){for(n=e,a=p(t);h>n;n++)if(u[n]){if(!(h>a&&u[n].test(C[a])))break;C[n]=C[a],C[a]=d(a),a=p(a)}A(),w.maskCaret(Math.max(s,e))}}function k(e){var t,n,a,i;for(t=e,n=d(e);h>t;t++)if(u[t]){if(a=p(t),i=C[t],C[t]=n,!(h>a&&u[a].test(i)))break;n=i}}function y(){var e=w.val(),t=w.maskCaret();if(m&&m.length&&m.length>e.length){for(T(!0);t.begin>0&&!u[t.begin-1];)t.begin--;if(0===t.begin)for(;t.begino)&&o&&13!==o){if(l.end-l.begin!==0&&(S(l.begin,l.end),b(l.begin,l.end-1)),n=p(l.begin-1),h>n&&(a=String.fromCharCode(o),u[n].test(a))){if(k(n),C[n]=a,A(),i=p(n),r){var f=function(){e.proxy(e.fn.maskCaret,w,i)()};setTimeout(f,0)}else w.maskCaret(i);l.begin<=g&&c()}t.preventDefault()}}}function S(e,t){var n;for(n=e;t>n&&h>n;n++)u[n]&&(C[n]=d(n))}function A(){w.val(C.join(""))}function T(e){var t,n,a,i=w.val(),r=-1;for(t=0,a=0;h>t;t++)if(u[t]){for(C[t]=d(t);a++i.length){S(t+1,h);break}}else C[t]===i.charAt(a)&&a++,f>t&&(r=t);return e?A():f>r+1?o.autoclear||C.join("")===D?(w.val()&&w.val("").trigger("change"),S(0,h)):A():(A(),w.val(w.val().substring(0,r+1))),f?t:s}var w=e(this),C=e.map(n.split(""),function(e,t){return"?"!=e?l[e]?d(t):e:void 0}),D=C.join(""),E=w.val();w.data(e.mask.dataName,function(){return e.map(C,function(e,t){return u[t]&&e!=d(t)?e:null}).join("")}),w.one("unmask",function(){w.off(".mask").removeData(e.mask.dataName)}).on("focus.mask",function(){if(!w.prop("readonly")){clearTimeout(t);var e;E=w.val(),e=T(),t=setTimeout(function(){w.get(0)===document.activeElement&&(A(),e==n.replace("?","").length?w.maskCaret(0,e):w.maskCaret(e))},10)}}).on("blur.mask",x).on("keydown.mask",j).on("keypress.mask",R).on("input.mask paste.mask",function(){w.prop("readonly")||setTimeout(function(){var e=T(!0);w.maskCaret(e),c(),console.log("blur!")},0)}),i&&r&&w.off("input.mask").on("input.mask",y),T()})}})}); John Parrott | Founder | T180 PROFESSIONAL®
FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      FREE STANDARD SHIPPING ON ALL $49+ US ORDERS       FREE STANDARD SHIPPING ON ALL $49+ US ORDERS      

John Parrott | Founder

Believing early on, that anything is possible when you set your mind to it. That confidence and determination were instilled in him by his Mother. His work as the Director of Strategic Promotions for a large promotions company allowed his creative side to flourish, developing successful promotional campaigns for some of the largest big-box retailers in the marketplace. After ten years in that position, John decided he needed a change. He went to work for an international media placement company representing print, tv, radio, outdoor, and digital media for high-profile clients from around the world. He was most proud of the work he did with his fashion and cosmetic clients, and the relationships he developed. To further explore his creative abilities, he started a marketing & promotions company that would challenge him like never before. With his new company in place, he was passionate about making a difference in the world. With that same passion and determination, John turned to his friends in the Health and Beauty Industry. He spent the next four years with his team, including several key people from around the globe, developing and perfecting what is now known as T180 Professional™. With that in place, JRP Global Health & Beauty™ was born, and the journey began!

Share this story on your favorite platform!

Articles You might also enjoy

Scroll to Top