jQWidgets Forums

jQuery UI Widgets Forums Dialogs and Notifications Window Scroll to bottom of jqxWindow

This topic contains 3 replies, has 2 voices, and was last updated by  zircon 11 years, 6 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Scroll to bottom of jqxWindow #29487

    zircon
    Participant

    Is there a method to scroll to the bottom of a jqxWindow when it is opened?

    Scroll to bottom of jqxWindow #29522

    Dimitar
    Participant

    Hello zircon,

    Unfortunately, there is no such method in jqxWindow’s API.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Scroll to bottom of jqxWindow #29524

    Dimitar
    Participant

    UPDATE: Here is a workaround on the matter:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.summer.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.10.2.min.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxwindow.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    $("#openWindow").click(function () {
    $("#jqxwindow").jqxWindow("open");
    });
    $("#jqxwindow").jqxWindow({ height: 90, width: 150, theme: 'summer', autoOpen: false });
    $("#jqxwindow").on("open", function () {
    $('#windowContent').scrollTop($('#windowContent')[0].scrollHeight);
    });
    });
    </script>
    </head>
    <body>
    <div id='content'>
    <button id="openWindow">
    Open window</button><div id='jqxwindow'>
    <div>
    Header</div>
    <div id="windowContent">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor
    incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
    exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute
    irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
    pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
    deserunt mollit anim id est laborum.Lorem ipsum dolor sit amet, consectetur adipisicing
    elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
    ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea
    commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
    cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident,
    sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem ipsum dolor
    sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore
    et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco
    laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit
    in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat
    cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.Lorem
    ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt
    ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
    ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
    reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur
    sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit
    anim id est laborum.</div>
    </div>
    </div>
    </body>
    </html>

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    Scroll to bottom of jqxWindow #29539

    zircon
    Participant

    Of course, there is a div on the window content.
    Many thanks!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.