around this issue the pseudo-selector :active doesn't set an element to active. It Selects the active link, which means only the time, when the mouse is clicked on the element until it's released! What you need ist to apply an class="active" on your element: When link #1 is active:
I wish did fix the issue. The problem here is that you are referencing one object multiple times. myVar[0] and myVar[1] are pointing to the same memory location. What you most likely want to do is create a new Sprite for every entry.
for (int i = 0; i < myVar.length; i++) {
myVar[i] = new Sprite(<your img>);//This will ensure you have a different
//memory location for each Sprite object
//but keep the same image.
}
CSS Image Sprites - Changing Display Setting Image Not Showing
hop of those help? I'm trying to change images using CSS Sprites, now, the problem is that display: none; to display: block; is working from jQuery, but the image is not showing (I'm checking the HTML via FireBug and its changing but the image is not showing at all) , Try this.
$(document).ready(function(){
$(".loader").show()// For visible; for hide use .hide()
$(".loader").css({'background-image':'url(../path/to/image.jpg)'}); //Changing background image.
});
Is there a .Net library to create Css sprites, from a list of Image objects, or image files?