I am currently attempting to utilize a background image in iScroll's JavaScript. The script appears to use CSS within the JavaScript and allows me to add a background color, but for some reason, it is not allowing me to add an image. Is there a way to work around this so that I can successfully incorporate an image?
Below is the specific section of code where I am facing difficulties in displaying the background image (images/scrollbar_bg.png).
if (that.options.scrollbarClass)
bar.className = that.options.scrollbarClass + dir.toUpperCase();
else
bar.style.cssText = 'position:absolute;z-index:100;
absolute; left: 0px; margin-left: 14px; background-url: images/scrollbar_bg.png; '
+ (dir == 'h' ? 'height:7px; bottom:20px; left:2px; right:'
+ (that.vScrollbar ? '7' : '2') + 'px' : 'width:7px;bottom:'
+ (that.hScrollbar ? '7' : '2') +
'px;top:14px;right:1px -border-radius:3px;border-radius:3px');
Thank you!