JSrcoller always inserts my div at the beginning

I use jScroller to show selection. It works great, but it always attaches my div to the top of the page than the exact position of the div ....

<div id="CaptDiv"> // this div is at the centre of my page
    <div id="CaptionDiv" class="captiontext">
        Find your Leads to Precede and Predate
    </div>
</div>

and I applied only this css ...

.captiontext
{
 font-weight:bold; color:#69442f;
 font-family: Arial,Helvetica,sans-serif; font-size:105%;margin-left:70px;
}

and my jquery,

     $(document).ready(function() {
        $jScroller.add("#CaptDiv", "#CaptionDiv", "right", 1);
        $jScroller.start();
    });

alt text http://img409.imageshack.us/img409/985/marquee.jpg

+3
source share
1 answer

Try adding a position: relative to the div containing the scroller. I would suggest that JsScroller adds a position: absolute for the scroller div, and the scroller div does not have a parent position. The scroller separator is located completely in relation to the body element.

+3
source

Source: https://habr.com/ru/post/1756168/


All Articles