Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-20-2013, 05:03 PM   PM User | #1
DanHardy
New Coder

 
Join Date: Mar 2010
Posts: 26
Thanks: 2
Thanked 0 Times in 0 Posts
DanHardy is an unknown quantity at this point
Carousel Problem

Hi Guys,

I'm stuck on this. I am using CarouFredSel and have the slider up and running perfectly. However, I am also trying to hook into its "onAfter" function that enables you to specify what happens after each transition. I am hiding some content by each slide, and then want to insert that content into a container visible on the page. Howver, it seems like my on after is only runing once.

Here is my code:

Code:
$("#foo1").carouFredSel({
		responsive	: true,
		auto : true,
		next:'#next',
		prev:'#prev', 
		circular: true,
		infinite: false,
		direction: "left",
		items		: {
			visible		: 1,
			width		: 870,
			height		: "46%"
		},
		 scroll: {
onAfter: function() {
	
var pos = $(this).triggerHandler( 'currentPosition' );

$('.slide').removeClass('selected');
$('.slide').eq(pos).addClass('selected');

var bacon = $(this).children('.slide.selected').children('.hidden-title').html();



$("#slideshow-text").html(bacon).html();

}
}
		

});
And my HTML if it helps:

Code:
<div class="slide">
                    
                        <img src="<? echo $url?>" alt="<?php the_title(); ?>" width="870" height="400" />
                         
                        <div class="hidden-title">
                        	<?php the_title(); ?>
                        </div>
                        <!-- .hidden-title --> 
                                                                       
                    </div>
                    <!-- .slide -->
Thanks in advance

Dan
DanHardy is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 04:50 PM.


Advertisement
Log in to turn off these ads.