javascript - Blink a glyphicon - Stack Overflow

I am using glyphicon in kendogrid. I want the glyphicon to blink after a fixed interval of time.My gly

I am using glyphicon in kendogrid. I want the glyphicon to blink after a fixed interval of time. My glyphicon is

<span class="glyphicon glyphicon-one-fine-white-dot blink" title="{{ConsoleLabels.TTP_SENDING}}"></span>

I am using glyphicon in kendogrid. I want the glyphicon to blink after a fixed interval of time. My glyphicon is

<span class="glyphicon glyphicon-one-fine-white-dot blink" title="{{ConsoleLabels.TTP_SENDING}}"></span>
Share Improve this question edited May 26, 2016 at 14:49 Gaurang Tandon 6,81911 gold badges51 silver badges95 bronze badges asked Mar 10, 2016 at 5:06 Rajesh ChoudharyRajesh Choudhary 2193 silver badges13 bronze badges 3
  • why is happening, is your code broken, you have a error, you don't achieve the desired function? – madalinivascu Commented Mar 10, 2016 at 5:13
  • i want to do it using javascript or jquery,i dont have any idea about this – Rajesh Choudhary Commented Mar 10, 2016 at 5:15
  • you can do it with css animations – madalinivascu Commented Mar 10, 2016 at 5:18
Add a ment  | 

2 Answers 2

Reset to default 6

Add this css in your page

.blink {
  animation: blinker 1s linear infinite;
}

@keyframes blinker {  
  50% { opacity: 0.0; }
}

Note: For older version use prefixes

Since you want to do it using javascript or jquery, here's a simple way to blink text (via opacity). The element will still keep it's proportions as a block but be hidden from view.

var value = false;
setInterval(function(){  
  value = !value;
  $('[data-blink]').css('opacity', Number(value))
}, 500)
<script src="https://ajax.googleapis./ajax/libs/jquery/1.9.1/jquery.min.js"></script>

<<span data-blink>Blinking Text</span>>

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745209877a4616772.html

相关推荐

  • javascript - Blink a glyphicon - Stack Overflow

    I am using glyphicon in kendogrid. I want the glyphicon to blink after a fixed interval of time.My gly

    5小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信