Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: Step Carousel with jquery cycle script

  1. #1
    Join Date
    Nov 2009
    Location
    Lithuania
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Post Step Carousel with jquery cycle script

    1) Script Title: Step Carousel v1.8

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...epcarousel.htm

    3) Describe problem:

    After ddadmin's sterling efforts to help resolve my earlier thread here http://www.dynamicdrive.com/forums/s...ad.php?t=53399 my client/girlfriend has now requested a fade transition instead of a glide!

    I had a dig around the scripts here and really liked the Ultimate Fade-in Slide Show for its fade effect but decided not to use it in conjunction with the Step Carousel (I was concerned about its use of an image array as opposed to a div) and instead went for the JQuery cycle script.

    I'm having problems combining the two, 'Cycle' works fine on it own see here http://www.make-up.lt/cycle but when I add it to my existing template there is a javascript error when executing. http://www.make-up.lt/covers

    If somebody could check the code I would be most grateful.

    Many thanks,

    Badgio
    Last edited by Badgio; 03-28-2010 at 07:43 PM. Reason: Links

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Remove this:

    Code:
    jQuery.noConflict()
    from near the beginning of the stepcarousel.js file.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Nov 2009
    Location
    Lithuania
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Great that works!

    On another matter, as per the earlier thread that I linked above, ddadmin suggested this addition to the 'step carousel' setup code that would trigger the 'glider' transition.
    Code:
    stepcarousel.setup({
    	galleryid: 'mygallery', //id of carousel DIV
    	beltclass: 'belt', //class of inner "belt" DIV containing all the panel DIVs
    	panelclass: 'panel', //class of panel DIVs each holding content
    	autostep: {enable:true, moveby:1, pause:3000},
    	panelbehavior: {speed:500, wraparound:false, persist:true},
    	defaultbuttons: {enable: true, moveby: 1, leftnav: ['http://i34.tinypic.com/317e0s5.gif', -5, 80], rightnav: ['http://i38.tinypic.com/33o7di8.gif', -20, 80]},
    	statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
    	contenttype: ['inline'], //content setting ['inline'] or ['ajax', 'path_to_external_file'],
    	onpanelclick:function(target){
    	 if (target.tagName=="IMG"){
    			featuredcontentglider.cancelautorotate(gliderconfig.togglerid)
    			featuredcontentglider.glide(gliderconfig, target.getAttribute('idx'))
    	 }
    	}
    })
    Now that I am using 'cycle' instead, I guess I just need to replace this with a call to the appropriate 'cycle' function?

    Cheers!

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Yes. Give it a shot.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Nov 2009
    Location
    Lithuania
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    OK I've had a go, but I am a bit stuck.

    First off, I declared the 'cycle' function.
    Code:
    <script type="text/javascript">
    function imagechange() {
    	$('#test').cycle({
    		fx:  'fade',
    		timeout: 0,        
    		speed:  200
    	});
    }
    
    imagechange();
    </script>
    The example code given to manually trigger the 'cycle' is as follows, although this is tied to a button. This being the img index value
    Code:
    $('#button1').click(function() { 
        $('#test').cycle(0); 
        return false; 
    });
    What I cant workout is how to bind this 'trigger' function to the onpanelclick:function of the 'Step Carousel' and pass the 'idx' variable from ddadmin's earlier example?

    Any help would be greatly appreciated.

    Badgio

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'd try something straightforward like:

    Code:
    	onpanelclick:function(target){
    	 if (target.tagName=="IMG"){
    			$('#test').cycle(target.getAttribute('idx'));
    	 }
    	}
    Give that a shot. If there are problems try:

    Code:
    	onpanelclick:function(target){
    	 if (target.tagName=="IMG"){
    			$('#test').cycle(target.getAttribute('idx') - 0);
    	 }
    	}
    Still problems? Post a link to the page.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  7. #7
    Join Date
    Nov 2009
    Location
    Lithuania
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    No joy...

    I have republished the page here http://www.make-up.lt/covers

    I had a look in firebug to see if there were any obvious errors, and the only thing that got returned was this [cycle] terminating; zero elements found by selector (DOM not ready)

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'm not getting that or any error. Looking at the cycle script, I don't think it can do that.

    You might want to look at:

    http://home.comcast.net/~jscheuer1/side/vfs/jsjq_2.htm

    I think it can be adapted to do what you want. But I'll have to get back to you on how.
    Last edited by jscheuer1; 03-29-2010 at 06:33 PM. Reason: add hope
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  9. #9
    Join Date
    Nov 2009
    Location
    Lithuania
    Posts
    23
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks for the time you spent looking into this.

    I checked out your slideshow and yes, if adapted that would work.

    The truth is...I'm just after any fade transition that can be called/bound to the carousel onpanelclick:function.

  10. #10
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I've got a mock up:

    http://home.comcast.net/~jscheuer1/s...carousel_h.htm

    If you need help implementing it, let me know. Please download and use your own copy of:

    http://home.comcast.net/~jscheuer1/s...lideshow_2b.js

    Once you do that, you can get rid of:

    HTML Code:
    <base href="http://www.make-up.lt/covers/" />
    Also, notice that I've removed all traces of the cycle script, and all that was added before for this that's no longer needed (like idx), and rearranged things a bit to make them more valid (your page had two heads!). The onpanelclick is no longer required, the jsjqslideshow_2b script uses classes to define its own controls and these are now in the carousel's panels. Use your browser's 'view source' to get the code from the page. Quite a bit a tweaking can be done if desired/required (much through css alone), though of course not every possible thing that can be imagined can be done.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •