Width of Sprite image adjusted to Ajax generated content
I have a form button that开发者_C百科 has a sprite image as background. It works fine with all content EXCEPT if the content is loaded via AJAX.
Thanks!
try setting an id say <button type="button" id="foo">Click Me!</button>
and put the css within the content that is loaded using ajax.
<style type="text/css">
/*<![CDATA[*/
#foo
{
background: transparent url('http://foo.com/images/sprites.png') no-repeat fixed 0px 0px;
}
/*]]>*/
</style>
精彩评论