For some, this may seem like a silly question, but I am looking to achieve a blinking effect for the last list item on my website. This list item has an image as its background and I want it to change colors rapidly, creating the illusion of blinking. Currently, I have managed to make it switch colors on hover using CSS, but I would like to utilize jQuery to animate this button and create the blinking effect...
Here is my HTML code:
<ul>
<li id="view"><a href="#">One</a></li>
<li id="contact"><a href="#">Two</a></li>
<li id="checkit"><a href="#">Three</a></li>
</ul>
I have added two extra classes in the CSS named "on" and "off," which I thought could be used in jQuery to animate the background images.
#header ul li#checkit a.off{background-position: -352px 0;}
#header ul li#checkit a.on{background-position: -352px -73px;}
Is there a simple way to either change the background every 0.5 seconds or switch between the "on" and "off" classes to achieve this effect?
$(document).ready(function() {
//$('#header ul li#checkit').addClass('on');
//$('#header ul li#checkit').addClass('off');
$('#header ul li#checkit').animate({ ? }, 150);
});
Thank you in advance, Marty.