JQuery picture load

I need some help in jQuery. What I'm trying to do is to create some sort of a small picture gallery. In this gallery I've got a couple of small pics and one big pic. By clicking a small picture I want jQuery to load and replace the big picture. Here's a little try which does not work! But probably someone could tell me why. $(function(){ $("a.smallpics").click(function(e){ $(".bigpic") .load(function () { $(this).hide(); $('#loader') .append(this); .removeClass('loading') $(this).fadeIn(); }); .attr('src', this.href); e.preventDefault(); }); }); and the html
So in the best case the script would cover the big picture with a grey half transparent layer, start a spinner and after loading fading the picture in. (Spinner is in background of class 'loading') Thanks for your help.
From what I understand from your question you seem to want a jQuery gallery/slideshow thingie. There are many many plugins for this out there already. e.g. check this blueprintds.com/2009/01/20/…

以上就是JQuery picture load的详细内容,更多请关注web前端其它相关文章!

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

评论 抢沙发

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

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

联系我们

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

支付宝扫一扫打赏

微信扫一扫打赏