Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript jquery cycle on an ajax loaded page with hash

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34731
    peachorama
    Member

    I am using ajax to load content from other html documents into a div #content – the url then becomes mydomain/index.html#user1. Each “user” html document has a jquery cycle slideshow. If I look at the user page independently (not loaded via ajax) the slideshow works fine. If I look at the user page loaded via ajax on the index page, the slideshow does not work.

    I call jquery and cycle from index here is what i have at the top:

    I’ve tried calling cycle from the loaded page and it still does not work. I would be very grateful if anyone had any ideas for this newbie! thanks!

    #100531
    xpy
    Participant

    I suppose that every time you load content with ajax you must call again

    $('#slideshow').cycle({
    fx: 'fade',
    prev: '#prev',
    next: '#next',
    timeout: 0
    });

    and that’s because the elements that used to hold the slider are being replaced, along with their event listeners and stuff…

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.