开发者

Javascript / Ajax image gallery/retrieval

I'm still new to js so please bear with me if this doesn't make sense. I'm wondering if it's possible to generate a gallery that doesn't refresh the page based on already generated开发者_JAVA百科 pages.

Example gallery: http://www.theaustralian.com.au/news/executive-lifestyle/gallery-fn697wf9-1226045027371?page=1

In the example above, is it possible to make it so the image retrieval is much smoother so that it doesn't look like it's a new page everytime you click next/previous?

All this is based on the assumption I can't change the mark-up/backend. So everything has to be done on the existing mark-up.

Thoughts?


I don't think you even need ajax.

You could do like do:

When the next button is clicked, change the attribute "src" of the image element and it should change your image.

Now you might want to use ajax to find whats the next image name; here comes ajax. You would probably want to use jQuery, Dojo, Prototype, MooTools.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜