Simple. Need help with getAttribute to style BackgroundImage
I've created a page with all of the script and html inline http://22.214.171.124/spartanstatic/sumitomo/slider.html
Please take a look at and see if you can help me. This is going to be linked to CMS so i need something in the html so that i can tie it in. Possibly a getAttribute by rel tag and then specify the location of the image in the rel tag..? Or if there's a better way any help and advice is appreciated!
getAttribute won't work for style properties in ie.
You can set the element.style.backgroundImage='url(quoted url)';
make sure the url is quoted, and if you can make it an absolute reference you'll have few problems.
Bummer about the IE support.
Putting the image in quotes doesn't help. I need it to be a variable that i pass in the html rather than a fixed location inside the JS.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)