I am trying to use code given at http://jsfiddle.net/Jf4vB/211/. The code runs perfectly in fiddle but when I trying to excute same code in my projuect I am not getting that "Glow Effect"
My code is as follows:
<script type="text/javascript" src="../Scripts/jquery-1.7.1.js"></script>
<script type="text/javascript">
function changeColor(id) {
nIntervId = setInterval("flashText('"+id+"')", 1000);
}
$.fn.glowEffect = function (start, end, duration, callback) {
if (this.data("last-glow"))
start = this.data("last-glow");
return this.animate(
{
'placeholder': end
},
{
duration: duration,
step: function (now, fx) {
now = parseInt(start + (start - end) * (fx.pos));
$(fx.elem).css("text-shadow", "0px 0px" + now + "px #c61a1a").data("last-glow", now);
},
complete: callback
});
};
function flashText(id) {
var oElem = $('#'+id).find(":checkbox").next();
oElem.stop() .glowEffect(0, 50, 1000,
function () {
$(this).glowEffect(50, 0, 1000);
});
}
function stopTextColor() {
clearInterval(nIntervId);
}
</script>
<div id="divchkBox">
<asp:CheckBox ID="chkBox" runat="server" Text="hi" />
</div>
<asp:Button ID="start" Text="start" runat="server" OnClientClick="changeColor('divchkBox');" />
<asp:Button ID="stop" Text="stop" runat="server" OnClientClick="stopTextColor();" />
all I am trying achieve is, on click of start button -> text next to checkbox("Hi") should have the effect as in above fiddle continuously till I click on stop button.