jQWidgets Forums

jQuery UI Widgets Forums Navigation NavigationBar, ToolBar, NavBar Bad rendering when inside an hidden container

This topic contains 3 replies, has 2 voices, and was last updated by  PaoloBax 12 years, 8 months ago.

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

  • PaoloBax
    Participant

    I’m using the Navigationbar inside a div which in the beginning is hidden (display: none). This causes the widget to behave incorrectly when I make the div visible again, with some of its elements not being displayed, the arrow not aligned correctly, etc.
    If I make that div visible since the beginning, or if I hide it when the onLoad function on the body tag is executed only, then everything works fine.
    Is there a workaround? For example a method which forces the widget to be re-rendered (I could call it as soon as I make the div visible again).


    Peter Stoev
    Keymaster

    Hi PaolaBax,

    The widget is required to be visible when it is initialized. After that, you can hide it or its container. This is necessary because of the widget’s layout which uses its Width and Height – they will be incorrect if the container is hidden.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    PaoloBax
    Participant

    Any chance you can implement a method to refresh the rendering? Because otherwise it is not clear how to create applications made of different views which are hidden on startup.


    PaoloBax
    Participant

    I solved by hiding the container using opacity:0 instead of display:none. Just a workaround but it does the trick.

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

You must be logged in to reply to this topic.