Note that there are some explanatory texts on larger screens.

plurals
  1. POProblem: Jquery Cycle - Image + Description rotator /w custom thumbnails
    primarykey
    data
    text
    <p>I'm attempting to build a custom Image + Description rotator /w custom thumbnails using Jquery Cycle.</p> <p>Something kind of like this example: <a href="http://www.malsup.com/jquery/cycle/pager2.html" rel="nofollow noreferrer">http://www.malsup.com/jquery/cycle/pager2.html</a>, but using DIV (instead of images) and custom thumbnails from an alternate directory.</p> <p>From what I can understand this is how I'd build the sample above using DIVS:</p> <pre><code>$('#slideshow').before('&lt;ul id="nav"&gt;').cycle({ fx: 'turnDown', speed: 'fast', timeout: 0, pager: '#nav', // callback fn that creates a thumbnail to use as pager anchor pagerAnchorBuilder: function(idx, slide) { var src = $('img',slide).attr('src'); return '&lt;li&gt;&lt;a href="#"&gt;&lt;img src="' + src + '" width="100" height="50" /&gt;&lt;/a&gt;&lt;/li&gt;'; } }); </code></pre> <p>How do I parse/modify 'src' or just pull the file-name rather than the directory?</p> <p>This doesn't work but it sort of what I want to do....</p> <pre><code>pagerAnchorBuilder: function(idx, slide) { var src = $('img',slide).attr('src'); var thumbdir = 'static/images/thumbs/'; return '&lt;li&gt;&lt;a href="#"&gt;&lt;img src="' thumbdir + src + '" width="100" height="50" /&gt;&lt;/a&gt;&lt;/li&gt;'; } </code></pre> <p>Basically... If the image src directory for large images in $slideshow is static/images/full/ how do I pullthumbnails from static/images/thumbs/ (the file names will be identical) using the pagerAnchorBuilder ?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload