简体   繁体   中英

using jquery steps ,how can we load last step directly

I am new to jquery steps,I have requirement to load last step directly once form is loaded. Can anybody suggest how can I achive this?

So, instead of putting this in jquery.steps.js (which could cause your changes to be overridden when you upgrade), just put the following on the page you want to use steps in. You set the startIndex behavior. Below I left some of the other settings so you could see how the Behaviors at jquery steps can be applied.

$("#steps").steps({
        headerTag: "h3",
        bodyTag: "section",
        enableAllSteps: true,
        transitionEffect: "slide",
        stepsOrientation: "vertical",
        startIndex: 1, // Right here, you can set the index of the item you want to change.
    });

Assuming you want to go directly to last step, change one property in jquery.steps.js file

startIndex: 0 ,

Add your last steps number in place of '0'.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM