English 中文(简体)
j 粉碎循环[循环][循环]终止;滑坡太少: 页: 1
原标题:jQuery Cycle Plugin [cycle] terminating; too few slides: 1

页: 1

[周期]终止;滑坡太少: 页: 1

下面是《酒类循环法》。 我不敢肯定为什么在 Chrome的 in中出现这种情况。

var inners = $( ul#output li ).cycle().cycle( stop );

        var slideshow = $( ul#output ).cycle({
            fx:  scrollHorz ,
            speed: 300,
            timeout: 0,
            startingSlide: 0, 
            before: function() {

                // stop all inner slideshows
                inners.cycle( stop );

                // start the new slide s slideshow
                $(this).cycle({
                    fx:  fade ,
                    timeout: 1000,
                    autostop: true,
                    end: function() {
                        // when inner slideshow ends, advance the outer slideshow
                        slideshow.cycle( next );
                    }
                });
            }
        });

        $.featureList(
                $("#tabs li a"),
                $("#output li"), {
                    start_item  :   0
                }
            ); 

什么可能是错误的?

问题回答

actually this error comes when your sliding elements Less than 2. if you want to run cycle plugin in single element also then go to

jquery.rix.all.js

发现

if (els.length < 2) {
            log( terminating; too few slides:   + els.length);
            return;
        }

将条件限制改为1

if (els.length < 1) {
            log( terminating; too few slides:   + els.length);
            return;
        }

if you don t want run single element then you should put condition on your language side that render element if elements count > 2

Cheers!

Mudassar Ali

这符合你的第一行:

var inners = $( ul#output li ).cycle().cycle( stop );

页: 1 如果你试图:

var inners = $( ul#output ).cycle().cycle( stop );

它不重复任何错误。





相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签