Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Switch Content Script mod to keep images from loading until content is clicked?

  1. #1
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile Switch Content Script mod to keep images from loading until content is clicked?

    1) Script Title: Switch Content Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...tchcontent.htm

    3) Describe problem: I'm using this script so users can select the size of the thumbnails on my site. So each size (small, medium, and large) have their own div. But from what I can tell, all the thumbnails load on page start, so it kind of defeats the purpose. Is there a way to keep the images from loading until the content is expanded?

    Thanks!

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    This would involve Ajax to dynamically fetch the contents within the collapsing DIVs. There's curently no quick way to add this feature, but I'll most likely add it the next time the script is updated, probably within the next 2-3 weeks.

  3. #3
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    This would involve Ajax to dynamically fetch the contents within the collapsing DIVs. There's curently no quick way to add this feature, but I'll most likely add it the next time the script is updated, probably within the next 2-3 weeks.
    Awesome, I can't wait to see that. I don't suppose there is any other method besides using Ajax?

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Well, if the content being loaded are exclusively images, then there are other ways to load them on demand besides using Ajax, which works with content in general. But then such an approach would need to custom tailored much more than the Ajax route. Are you basically talking up DIV contents that contain nothing else but images that should be loaded only when the DIV expands?

  5. #5
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    Well, if the content being loaded are exclusively images, then there are other ways to load them on demand besides using Ajax, which works with content in general. But then such an approach would need to custom tailored much more than the Ajax route. Are you basically talking up DIV contents that contain nothing else but images that should be loaded only when the DIV expands?
    Yes, but my images are inside of a table. Would that still work? If not, I'll wait until Ajax feature gets added to the script.

    Thanks

  6. #6
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    another question, i'm using the same set up as demo 1 on http://www.dynamicdrive.com/dynamici...tchcontent.htm

    is there a way to keep the content from contracting when i click it? i have one open automatically by default and i always want at least one open, so is it possible to change the code to keep the line from contracting?

  7. #7
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Quote Originally Posted by transistor View Post
    Yes, but my images are inside of a table. Would that still work? If not, I'll wait until Ajax feature gets added to the script.

    Thanks
    Do you mean your switch Contents consist of an entire table inside with images?
    is there a way to keep the content from contracting when i click it? i have one open automatically by default and i always want at least one open, so is it possible to change the code to keep the line from contracting?
    Yep, please do a search in the future first. It's discussed here: http://www.dynamicdrive.com/forums/s...ad.php?t=29477

  8. #8
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ddadmin View Post
    Do you mean your switch Contents consist of an entire table inside with images?


    Yep, please do a search in the future first. It's discussed here: http://www.dynamicdrive.com/forums/s...ad.php?t=29477
    Yep, the content is only a table with an image in each cell.

    Thanks for the link!

  9. #9
    Join Date
    Jan 2008
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hello, I was wondering if the changes have been implemented yet. Thank you.

  10. #10
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Not yet unfortunately. You probably will have to wait until when the Ajax feature is added to this script, since thinking about it, that's probably actually easier than trying to do a delayed fetch of a specific content type like just images instead.

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
  •