Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Graphics, Flash and Multimedia _ Creating an image slider (ajax?) as seen on...

Posted by: afsmith21 Jan 30 2012, 10:34 AM

Hi,

I am trying to create an image slider like the one seen in the WhiteHouse.gov Photo Gallery under the big gray image box.

http://www.whitehouse.gov/photos-and-video/photogallery/january-2012-photo-day

Attached Image

I need the navigation links as well. (Mouse hovering over the slider navigation links shows links to /ajax?/ so I assume they are using ajax code.)

Can someone please provide code for this?

Thanks in advance!

Posted by: pandy Jan 30 2012, 11:30 AM

Have you searched the script sites, for example http://hotscripts.com ? Or googled?

Posted by: afsmith21 Jan 30 2012, 01:29 PM

QUOTE(pandy @ Jan 30 2012, 11:30 AM) *

Have you searched the script sites, for example http://hotscripts.com ? Or googled?


Yes I've tried searching script sites and I have posted a script request at HotScripts. I have googled but haven't found anything like the slider I'm looking for.

Posted by: Christian J Jan 30 2012, 02:35 PM

QUOTE(afsmith21 @ Jan 30 2012, 04:34 PM) *

Hi,

I am trying to create an image slider like the one seen in the WhiteHouse.gov Photo Gallery under the big gray image box.

I don't understand, the slideshow is the gray box. unsure.gif

Posted by: Frederiek Jan 31 2012, 04:31 AM

There is an image gallery slideshow (black bkg) at the top, but the OP looks for the pagination slider beneath (hence his screenshot).

Indeed, AJAX is used (among other things, such as Drupal and jQuery plugins (as seen in their long js file)). Anyway, the content is an unordered list, with a link containing the image and its caption, which changes the background color upon hover.

Try searching for "jquery ajax pagination".

Posted by: Christian J Jan 31 2012, 10:45 AM

QUOTE(Frederiek @ Jan 31 2012, 10:31 AM) *

the OP looks for the pagination slider beneath (hence his screenshot).

I don't see anything that slides there though, it's just a pagination of thumbnails. unsure.gif

A pagination might be done with a server-side script, if you accept loading a new web page for each pagination section. This way you can also add more pictures to a web directory and the web pages update automatically.

It can also be done with javascript, if you can't accept loading a new web page, similar to http://www.alistapart.com/d/eatcake/4.html

Ajax seems like overkill, unless you need the javascript solution and there are too many images to load on a single page.

Posted by: afsmith21 Jan 31 2012, 02:34 PM

QUOTE(Christian J @ Jan 31 2012, 10:45 AM) *

QUOTE(Frederiek @ Jan 31 2012, 10:31 AM) *

the OP looks for the pagination slider beneath (hence his screenshot).

I don't see anything that slides there though, it's just a pagination of thumbnails. unsure.gif

A pagination might be done with a server-side script, if you accept loading a new web page for each pagination section. This way you can also add more pictures to a web directory and the web pages update automatically.

It can also be done with javascript, if you can't accept loading a new web page, similar to http://www.alistapart.com/d/eatcake/4.html

Ajax seems like overkill, unless you need the javascript solution and there are too many images to load on a single page.


Thanks for the reply. Right, the pagination is what I am looking for. However, I want it to behave as it does on the WH.gov page, not opening a new page for each pagination section.

So, javascript seems to be a fine solution. Can this be done easily by anyone reading?

Posted by: Christian J Jan 31 2012, 03:47 PM

I wouldn't say it's easy.

I googled for "thumbnail pagination" and similar but didn't find much. Are there perhaps other terms describing this kind of thing?

Posted by: Frederiek Feb 1 2012, 03:13 AM

As far as I can tell, the white house site uses the jQuery Cycle plugin ( http://jquery.malsup.com/cycle/ ) in combination with some (ajax and/or json(?)) pagination mechanism.

It looks like a simple slideshow, that doesn't autostart, similar to http://www.stunicholls.com/gallery/jquery-photo-slide.html or http://www.stunicholls.com/various/jquery-info-slide.html .

I also tried quite a few search strings. I just tried "content slider with pagination". That seems to show some interesting results, such as (to name just a few) : http://cssglobe.com/post/5780/easy-slider-17-numeric-navigation-jquery-slider from CSS Globe or http://www.dynamicdrive.com/dynamicindex17/virtualpagination.htm from Dynamicdrive.

Maybe these will help you to get on the right track.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)