title: Evaluate a data-attibute on a div with jQuery and pass the value into a function
body: <p>I have multiple slideshow blocks with preview images (for jQuery Cycle, each slideshow instance with a different delay in milliseconds) like this:</p>
  
  <pre><code>&lt;div class="content"&gt;
      &lt;div class="slideshow preview" data-delay="-2000"&gt;
          &lt;img src="media/prevslide_3.jpg" alt="Img 1" /&gt;
          &lt;img src="media/prevslide_4.jpg" alt="Img 2" /&gt;
          &lt;img src="media/prevslide_5.jpg" alt="Img 3" /&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to use jQuery to pass these varying delay values (set via data-attribute)into the function that will run all occurences of Cycle.</p>
  
  <pre><code>$(document).ready(function() {
  
  $('.slideshow.preview').cycle({
      fx: 'scrollHorz',
      random: 1,
      speed: 300,
      timeout: 6000,
      // here, for a single slideshow, delay is set like this "delay: -1234"
  });
  });
  </code></pre>
  
  <p>How does one evaluate the data-attribute on the div - data-delay="-2000" - and passes it into the Cycle function?</p>
  
  <p>Many thanks in advance!</p>