Ajax loading images in XML - loading image and fade?

I am loading in an XML document with multiple photos in it, via ajax. The process my function goes through is this: Open a UL Open a LI Open an img tag set the src to = the url in the xml document (see below) close img tag close LI open a LI open an img tag set the src to = the url in the xml document (see below) close img tag close LI close UL It creates a new List item and puts the img tag inside for each individual tag in the xml document. And the xml is this, but with more entries: 0.jpg1.jpg and a snippit of my function that deals with the image src is for (i=0;i"; xx=x[i].getElementsByTagName("url"); { try {txt=txt + ""; } catch (er) {txt=txt + "
  • ";} } txt=txt + ""; } My question is, how do I make these fade in once they have been loaded? and how should i go about adding the loading.gif's behind? I was thinking of a simliar function that writes image tags with loading.gif as the src, then in the function above getting each element by id and changing the src. gonna give this a go, any other soltions welcome. But mainly i need to work out howo to fade this bad boy. thanks

    以上就是Ajax loading images in XML - loading image and fade?的详细内容,更多请关注web前端其它相关文章!

    赞(0) 打赏
    未经允许不得转载:web前端首页 » jQuery 答疑

    评论 抢沙发

    • 昵称 (必填)
    • 邮箱 (必填)
    • 网址

    前端开发相关广告投放 更专业 更精准

    联系我们

    觉得文章有用就打赏一下文章作者

    支付宝扫一扫打赏

    微信扫一扫打赏