diff --git a/jquery.pulsate.js b/jquery.pulsate.js index c39a3e1..890d82d 100644 --- a/jquery.pulsate.js +++ b/jquery.pulsate.js @@ -52,14 +52,9 @@ }; if(options.glow) { cssObj["box-shadow"] = "0px 0px " + parseInt((count/1.5)) + "px " + color; - userAgent = navigator.userAgent || ''; - if(/(chrome)[ \/]([\w.]+)/.test(userAgent.toLowerCase())) { - cssObj["outline-offset"] = count + "px"; - cssObj["outline-radius"] = "100 px"; - } - } else { - cssObj["outline-offset"] = count + "px"; } + cssObj["outline-offset"] = count + "px"; + $(el).css(cssObj); var innerfunc = function () { @@ -74,7 +69,7 @@ } pulse(options, el, count+1); }; - + if(el.timer){ clearTimeout(el.timer); } @@ -100,4 +95,3 @@ }; })( jQuery ); - diff --git a/jquery.pulsate.min.js b/jquery.pulsate.min.js index 72a24d0..00f5ca4 100644 --- a/jquery.pulsate.min.js +++ b/jquery.pulsate.min.js @@ -1,4 +1,4 @@ -(function(c){var k={init:function(a){var b={color:c(this).css("background-color"),reach:20,speed:1E3,pause:0,glow:!0,repeat:!0,onHover:!1};c(this).css({"-moz-outline-radius":c(this).css("border-top-left-radius"),"-webkit-outline-radius":c(this).css("border-top-left-radius"),"outline-radius":c(this).css("border-top-left-radius")});a&&c.extend(b,a);b.color=c("
").css("background-color");!0!==b.repeat&&(!isNaN(b.repeat)&&0f?0:d;var h=(f-d)/f,e=a.color.split(","),h="rgba("+e[0].split("(")[1]+","+e[1]+","+e[2].split(")")[0]+","+h+")",e={outline:"2px solid "+h};a.glow?(e["box-shadow"]="0px 0px "+parseInt(d/1.5)+"px "+h,userAgent=navigator.userAgent||"",/(chrome)[ \/]([\w.]+)/.test(userAgent.toLowerCase())&& -(e["outline-offset"]=d+"px",e["outline-radius"]="100 px")):e["outline-offset"]=d+"px";c(b).css(e);b.timer&&clearTimeout(b.timer);b.timer=setTimeout(function(){if(d>=f&&!a.repeat)return c(b).pulsate("destroy"),!1;if(d>=f&&!0!==a.repeat&&!isNaN(a.repeat)&&0=f)return l(a,b,d+1),!1;g(a,b,d+1)},a.speed/f)},l=function(a,b,c){innerfunc=function(){g(a,b,c)};b.timer=setTimeout(innerfunc,a.pause)};c.fn.pulsate=function(a){if(k[a])return k[a].apply(this,Array.prototype.slice.call(arguments, -1));if("object"===typeof a||!a)return k.init.apply(this,arguments);c.error("Method "+a+" does not exist on jQuery.pulsate")}})(jQuery); +(function(c){var k={init:function(a){var b={color:c(this).css("background-color"),reach:20,speed:1E3,pause:0,glow:!0,repeat:!0,onHover:!1};c(this).css({"-moz-outline-radius":c(this).css("border-top-left-radius"),"-webkit-outline-radius":c(this).css("border-top-left-radius"),"outline-radius":c(this).css("border-top-left-radius")});a&&c.extend(b,a);b.color=c("
").css("background-color");!0!==b.repeat&&!isNaN(b.repeat)&&0e?0:d;var h=(e-d)/e,f=a.color.split(","),h="rgba("+f[0].split("(")[1]+","+f[1]+","+f[2].split(")")[0]+","+h+")",f={outline:"2px solid "+h};a.glow&&(f["box-shadow"]="0px 0px "+parseInt(d/1.5)+"px "+h);f["outline-offset"]=d+"px";c(b).css(f);b.timer&& +clearTimeout(b.timer);b.timer=setTimeout(function(){if(d>=e&&!a.repeat)return c(b).pulsate("destroy"),!1;if(d>=e&&!0!==a.repeat&&!isNaN(a.repeat)&&0=e)return l(a,b,d+1),!1;g(a,b,d+1)},a.speed/e)},l=function(a,b,c){innerfunc=function(){g(a,b,c)};b.timer=setTimeout(innerfunc,a.pause)};c.fn.pulsate=function(a){if(k[a])return k[a].apply(this,Array.prototype.slice.call(arguments,1));if("object"!==typeof a&&a)c.error("Method "+a+" does not exist on jQuery.pulsate"); +else return k.init.apply(this,arguments)}})(jQuery);