当我点击继续时它应该在Bootstrap Tour中滚动页面

时间:2014-08-05 13:14:48

标签: jquery openerp odoo

我有以下步骤之旅

   {
            waitNot:   'h1#blog_post_name:empty()',
            element:   'h1[data-oe-expression="blog_post.name"]',
            placement: 'top',
            title:     _t("Change Title, subtitle"),
            content:   _t("Write a title, the subtitle is optional."),
            popover:   { next: _t("Continue") },

        },
        {
            element:   '#blog_content',
            placement: 'top',
            title:     _t("Content"),
            content:   _t("Start writing your story here. Click on save in the upper left corner when you are done."),
        },            
        {

            waitNot:   '#blog_content .container.readable:empty()',
            element:   'button[data-action=snippet]',
            placement: 'right',
            title:     _t("Layout Your Blog Post"),
            content:   _t("Use well designed building blocks to structure the content of your blog. Click 'Insert Blocks' to add new content."),
            popover:   { fixed: true },
        },

现在当我点击第一步继续"更改标题,副标题"它转到下一个"内容" 。问题是"#blog_content"在底部div,所以我手动滚动页面以查看下一步。 我希望它直接滚动页面到那个div ..所以为此我必须做什么???

您还可以在视频中看到此问题..

https://www.youtube.com/watch?v=B6tkUX6oLc8 时间:0.30至0.50

1 个答案:

答案 0 :(得分:2)

对于这个答案可能有点晚了,但要确保你有

autoScroll: true

在您的顶级游览定义中,如API

中所述

http://bootstraptour.com/api/