Lasantha Samarakoon Lasantha Samarakoon - 1 year ago 187
Javascript Question

jQuery Joyride does not scroll properly within scrollable <DIV>

I have a page which has content wrapped within a scrollable DIV element (using CSS

overflow: auto;
). When I integrate Joyride plugin to tour the elements within the DIV it does not correctly scroll to the respective position in the DIV. Instead it scrolls the entire page.

Please refer:

Is there anything I have missed or any workaround to solve this issue?

Answer Source

I tried the same with EnjoyHint library as well, but couldn't find out a proper solution. Instead as a workaround I have added bookmarks within the page and then manually scroll to the bookmark before executing the step.

$(document).ready(function() {
        autoStart: true,
         modal: true,
        expose: true,
        preStepCallback: function(index, tip) {
            if (index === 4) {
                location.hash = 'anchor-name';
        postStepCallback: function(index, tip) {},
<a name="anchor-name"></a>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download