SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    JQuery Cycle Plugin Not Working When Hidden Div Becomes Visible?

    It works when its on its own page but when I place the code in a hidden div that becomes visible on click, it doesnt work.


    Using http://jsfiddle.net/qMMS7/


    What do I do to get the cycle plugin working when 1 of the hidden div is visible?

  2. #2
    SitePoint Zealot
    Join Date
    Sep 2008
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    not allowing me to edit my post, but here is an updated jsfiddle that shows exactly what the probelm is: http://jsfiddle.net/BT4Bk/.

    How do I get the anchors to work once the div is visible?

  3. #3
    SitePoint Addict sdleihssirhc's Avatar
    Join Date
    Feb 2009
    Posts
    387
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I know what the solution is. I'm not familiar enough with the plugin to know what exactly is going wrong, but here's my guess:

    1. You have your "slide" <div> hidden from view, ready and waiting.
    2. You turn that "slide" <div> into an image cycle.
    3. When the user clicks the link, you're copying the cycle's HTML into a different <div>.
    4. The original remains an image cycle, but the new one is still just markup.


    The solution is to turn the new markup into an image cycle instead of the original. Don't set up the cycle at the very beginning of your script, do it after you copy the HTML over. (Also, once that happens, you'll need to prevent the default action from the "Item 1" link.)
    I'm the web overlord for Graphic Business Systems


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
  •