0

Trying to Slide p Right to Left direction by jquery to this slider. This slider has fade effect by default, I'm trying give slideLeft effect to p description of slider, not to whole slider elements.

HTML:

<div id="headslide">
    <ul>
        <li class="post-content">
            <div class="slidshow-thumbnail">
                <a href="#">
                    <img src="http://3.bp.blogspot.com/-h4-nQvZ5-VE/VQ3HLtSS3ZI/AAAAAAAABIc/iaOda5zoUMw/s350-h260-c/girl_with_winter_hat-wallpaper-1024x768.jpg" height="260" width="350"/>
                </a>
            </div>
            <span class="content-margin">
          /* Description */
         <p>Cicero famously orated against his p...</p>
                /* Title */
                <h3><a href="#">Download Premium Blogger Templates</a></h3>
                <span class="info">Info</span>
            </span>
        </li>

        <li class="post-content">
            <div class="slidshow-thumbnail">
                <a href="#">
                    <img src="http://3.bp.blogspot.com/-YfkF1u_VB40/VWr5dYf00gI/AAAAAAAABW8/wv2e-Lu4etw/s390-h340-c-h340-c/11071467_807062866056131_872486685669967339_n.jpg" height="260" width="350"/>
                </a>
            </div>
            <span class="content-margin">
         /* Description */
        <p>SEO friendly Flat style Custom Fonts.</p>
                /* Title */
                <h3><a href="#">Modern with a pixel-perfect eye</a></h3>
                <span class="info">Info</span>
            </span>
        </li>
    </ul>
</div>

Please see this Fiddle >>. I'm trying to do this by jquery.

I have tried this
$(".content-margin").delay(400).show("p", { direction: "left" }, 1200);

Not working, How to give slideLeft effect to only p element, any suggestion?

Aariba
  • 1,174
  • 5
  • 20
  • 52

1 Answers1

1

the headslide slider supports callbacks that you can use to hide/slide the "p" elements.

$('#headslide ul').cycle({
   timeout: 4000,
   pager: '#headslide .pager',
   after: function(currSlideElement, nextSlideElement, options, forwardFlag){
       $(nextSlideElement).find("p" ).hide();               
       $(nextSlideElement).find("p" ).toggle("slide");       
       return false; 
}

jfiddle:http://jsfiddle.net/bacec898/7/

reference: http://jquery.malsup.com/cycle/options.html

Weijian
  • 174
  • 3