javascript - Target the slide after next in jQuery Cycle2 -


My purpose is to load the previous and the subsequent slides ( & lt; img & gt; ) before and after each After the current slide, in Cycle2 I can not get any problems with the previous slide, I do not get much later.

My HTML is as follows:

  & lt; Section & gt; & Lt; Div class = "slider appears" & gt; & Lt; / Div & gt; // Previous slide (1.jpg) goes here & lt; Div class = "banner_images" & gt; & Lt; Img src = "1.jpg" & gt; & Lt; Img src = "2.jpg" & gt; // Recent Slides ... & lt; Img src = "n.jpg" & gt; & Lt; / Div & gt; & Lt; Div class = "slider next" & gt; & Lt; / Div & gt; // Next slide (3.jpg) should go here, & lt; / Section & gt;  

and my jQuery:

  var cycle = {first: function (e, optionHash, outgoing slideslame, incomingslide EL, forward flags) {// Works! $ ('. Slider preview') Html ($ .clone (OutgoingSlideEl)); // does not work ... $ ('next slider'). Html ($ (incoming slider EL) .clone (). Next ('IMG') [0]); }, Run: function () {$ ('. Banner_images'). Cycle (this.attrs) .on ('cycle-before', function (e, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) {cycle.before (e, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag)}) .on (' After ', function (e, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag) {cycle.after (e, optionHash, outgoingSlideEl, incomingSlideEl, forwardFlag)}); }}  

This is the closest I can get without undefined or behavioral errors, but .sliderNext is not a div population.

I realize that once I get to the arcade slide, I have to use a conditional, but it will be enough to do some work now. Neither clon element $ (incomingSlideEl) .clone ()

since

> You do not want any next elements (this is also not in the Dome tree) nor do you want to actually clone the original image (to be cloned to the Next image, be it Html ($ (incoming slide EEL) .next ('img') clone ());

The idea is to find the next image of the current image and click on the next image. Not to add.


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -