Quote:
Originally Posted by blaze4218
You cannot access a className this way.
If you used an id instead
Code:
#content
{
height: 600px;
width: auto;
padding: 0px;
background-image: url("images/kontor-1.png");
background-repeat: no-repeat;
background-position: center;
}
Code:
document.getElementById('content').style.background = 'url(images/kontor-' + currentIndex + '.png)';
but as long as you are using jQuery, you would't have to switch to an id...
|
I'm very new to this like you probably already noticed, but i'm trying to use JQuery, but cant this to work =/