JQuery jFlow plugin. How can I have more than one page on one page?

I’m using a very lovely and simple plugin called jFlow that gives me a basic content slider etc. However, I can see no documentation or help on how to get two (or more) on one page at the same time working seperately from one another.

At the moment, if I set two up, they almost combine as one, despite having a different configuration from one another.

Any help would be great, thanks. Michael.

I have just battled with this and as Tim said, they key is to use classes, separate IDs and define everything in each instance of jFlow, like this:

$(function() {
        $("#controller1").jFlow({
            controller: ".jFlowControl1",
            slides: "#slides1",
            slideWrapper : "#jFlowSlide1",
            width: "300px",
            height: "280px",
            prev: ".jFlowPrev1",
            next: ".jFlowNext1"
        });
        $("#controller2").jFlow({
            controller: ".jFlowControl2",
            slides: "#slides2",
            slideWrapper : "#jFlowSlide2",
            width: "300px",
            height: "280px",
            prev: ".jFlowPrev2",
            next: ".jFlowNext2"
        });
        $("#controller3").jFlow({
            controller: ".jFlowControl3",
            slides: "#slides3",
            slideWrapper : "#jFlowSlide3",
            width: "300px",
            height: "280px",
            prev: ".jFlowPrev3",
            next: ".jFlowNext3"
        });
    });

And the sliders look something like this:


So pretty much everything has a 1, 2 or 3 after it, or however many jFlow sliders you want.

If you want the previous and next to work these would be defined in the same way, like so:

<
>


<
>


<
>
Hello, buddy!责编内容来自:Hello, buddy! (源链) | 更多关于

阅读提示:酷辣虫无法对本内容的真实性提供任何保证,请自行验证并承担相关的风险与后果!
本站遵循[CC BY-NC-SA 4.0]。如您有版权、意见投诉等问题,请通过eMail联系我们处理。
酷辣虫 » 前端开发 » JQuery jFlow plugin&period; How can I have more than one page on one page&quest;

喜欢 (0)or分享给?

专业 x 专注 x 聚合 x 分享 CC BY-NC-SA 4.0

使用声明 | 英豪名录