Monday, 11 February 2013

Blinking text using jQuery



<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Add blinking effect to text in jQuery</title>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.js"></script>
<script type="text/javascript">
$(function() {
blinkeffect('#txtblnk');
})
function blinkeffect(selector) {
$(selector).fadeOut('slow'function() {
$(this).fadeIn('slow'function() {
blinkeffect(this);
});
});
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="txtblnk"> <p><strong><font color="red">Welcome to dotnetdatastuff.blogspot.in</font></strong></p> </div>
</form>
</body>
</html>

2 comments:

Tamasha-E-Zindagi said...

this code is blinking only one text in one div not all the divs. its not working in 2 divs seperately.

net said...

Hi its working....You should mention Div name in function...


$(function () {
blinkeffect('#txtblnk');
blinkeffect('#Div1');
})

Post a Comment

Convert SVG to PNG using svg.dll

      <div id="divsvg">        <svg width="350" height="300"><defs></defs> ............