jQWidgets Forums

jQuery UI Widgets Forums Dialogs and Notifications Window Window position fixed

This topic contains 2 replies, has 3 voices, and was last updated by  Ivalde 9 years, 10 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Window position fixed #19433

    gabrynio
    Participant

    Hello,
    is it possible to set the window to behave like objects in the position ‘fixed’ (css)?
    Now I got problems with centering when I have window with big height after opening its appear centered but on top, not in place where right now window is scrolled.

    Best regards,
    Gabriel

    Window position fixed #19492

    Dimitar
    Participant

    Hello Gabriel,

    Here is how to make the window’s position fixed:

    $(document).ready(function () {
    $("#jqxwindow ").jqxWindow({ height: 90, width: 150, theme: 'summer' });
    $("#jqxwindow ").css("position", "fixed");
    });

    Best Regards,
    Dimitar

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

    Window position fixed #73828

    Ivalde
    Participant

    For the window always to be positioned in screen center, when scrolled or not scrolled, set the window div style to the following:

    style=”position: fixed; left: 50%; top: 50%;”

    Here is a complete example in which the winMsgTxt is set in runtime:

    <div id=”winMsg” style=”position: fixed; left: 50%; top: 50%;”>
    <div>
    <div id=”winMsgTxt”></div>
    <div>
    <div style=”position: absolute; bottom: 10px; right: 10px; margin-top: 10px;”>
    <input type=”button” id=”btnMsgOk” value=”OK” /><input type=”button” id=”btnMsgCancel” value=”Cancel” />
    </div>
    </div>
    </div>
    </div>

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

You must be logged in to reply to this topic.