jQWidgets Forums

jQuery UI Widgets Forums Lists DropDownList bug with text vertical align when not in DOM

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • adron
    Participant

    Hello.

    The problem is in the picture:
    dropdownlist vertical align problem

    If i create jqxDropDown list for element that in DOM – all ok.
    If i do something like that:

    
     <!DOCTYPE html>
    <html lang="en">
    <head>    
        <link rel="stylesheet" href="./jqw/jqwidgets/styles/jqx.base.css" type="text/css" />
        <script type="text/javascript" src="./jqw/scripts/jquery-1.10.2.min.js"></script>
        <script type="text/javascript" src="./jqw/jqwidgets/jqxcore.js"></script>
        <script type="text/javascript" src="./jqw/jqwidgets/jqxdata.js"></script> 
        <script type="text/javascript" src="./jqw/jqwidgets/jqxbuttons.js"></script>
        <script type="text/javascript" src="./jqw/jqwidgets/jqxscrollbar.js"></script>
        <script type="text/javascript" src="./jqw/jqwidgets/jqxmenu.js"></script>
        <script type="text/javascript" src="./jqw/jqwidgets/jqxcheckbox.js"></script>
        <script type="text/javascript" src="./jqw/jqwidgets/jqxlistbox.js"></script>
        <script type="text/javascript" src="./jqw/jqwidgets/jqxdropdownlist.js"></script>
        <script type="text/javascript" src="./jqw/jqwidgets/jqxgrid.js"></script>
        <script type="text/javascript" src="./jqw/jqwidgets/jqxgrid.sort.js"></script> 
        <script type="text/javascript" src="./jqw/jqwidgets/jqxgrid.pager.js"></script> 
        <script type="text/javascript" src="./jqw/jqwidgets/jqxgrid.selection.js"></script> 
        <script type="text/javascript" src="./jqw/jqwidgets/jqxgrid.edit.js"></script> 
        <script type="text/javascript">
            $(document).ready(function () {
              var box = $("<div>");
              //$("body").append(box); //if i add box to body there - all ok !
              box.jqxDropDownList({width: '200', height: '25', 'source': ['qqq', 'bbb', 'eee'], 'autoDropDownHeight': true,  'selectedIndex': 1});
              $("body").append(box); //if i add box to body there - we have a problem !
            });
        </script>
    </head>
    <body class='default'>
        <div id='jqxWidget'>
            <div id="jqxgrid">
            </div>
         </div>
    </body>
    </html>
    

    then we have a problem with vertical align text in box !


    Peter Stoev
    Keymaster

    Hi adron,

    Then create the widget when its Element is in the DOM.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.