Css
.myStyle {
height: 10px;
background-image: url(../myImage.png);
}
html
<img class=myStyle src=<%scriptlet%> >
Now the problem is in my js, i have written a error handler for this img tag, which would set the height to 0px. This 0px comes as style.height=0px but does not override height of class myStyle.
js
myImage = $('.myStyle', $el);
myImage.error(function () {
myImage.attr('style.height', '0px');
});
change:
to
To get background image, you can use getting, like
OR