SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    Swindon
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Jquery Image slider - load content asynchronously

    Hi all,

    I have created a site that my friends and I are using and Im trying to implement a simple image slider.

    I can do this without any issues in its simplest form. The issue though is that there are 10 people posting pictures and the site displays their last 6. What I want to do is create a button after each row that allows the user to scroll through that users pictures, but i dont want to preload all images first as this will make the page painfully slow.

    this image shows what I maen - the black arrow would make that particular row scroll right - loading images as it went.

    http://screencast.com/t/eSrppYOSi

    does this make sense?

    is it possible?

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by billybrag View Post
    does this make sense?
    Yes it does. You can use Ajax to retrieve from the server the next set of images.
    The Bulletproof Ajax book has a good example at the start of Chapter 6, which you can see at their codecode and demos[/url] page.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    Non-Member Max Height's Avatar
    Join Date
    Dec 2011
    Posts
    303
    Mentioned
    6 Post(s)
    Tagged
    1 Thread(s)
    Off Topic:


    I wonder if paul_wilkins is on a percentage of the royalties for that book


    because you don't need ajax at all for this. You could have all the path names to the images stored in a multi-dimensional array and then preload the images just before you want to make them visible as you scroll through each person's images.

    But if you do want to use ajax, there are plenty of very good free tutorials on google as well.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by Max Height View Post
    I wonder if paul_wilkins is on a percentage of the royalties for that book
    When I come across a resource that covers the topic as well as has been done in that book about Ajax, I let people know about it so that they can learn how to best deal with the topic. There is no need for royalties at all in any way.
    Last edited by paul_wilkins; Dec 21, 2011 at 22:01.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Addict
    Join Date
    Aug 2004
    Location
    Swindon
    Posts
    304
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    THank you both for the help!

    I will look into both solutions.

    Max Height - do you know of an example anywhere that shows what you mean?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •