EasyUI Forum
October 16, 2025, 11:02:07 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Elements position when opening  (Read 9891 times)
Fabrice
Jr. Member
**
Posts: 62


View Profile
« on: February 23, 2015, 01:01:32 AM »

I have an application with many layouts in main window, some layout contains images,

At first opening of the browser, images are not at there positions (images at bottom is at top) during few secondes and after they go to there good position.

I thinks it's because at begening library is not initialized but what can i do to hide this step?
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 23, 2015, 06:43:47 PM »

You can set the 'href' property to delay loading the panel's content.
Code:
<div class="easyui-layout" style="width:700px;height:350px;">
  <div data-options="region:'north'" style="height:50px"></div>
  <div data-options="region:'center',href:'_content.html'"></div>
</div>

Another way to solve this issue is to hide the special elements util all the components are parsed completely.
Code:
<body style="visibility:hidden">
...
</body>
<script type="text/javascript">
  $.parser.onComplete = function(context){
    $('body').css('visibility','visible');
  }
</script>
Logged
Fabrice
Jr. Member
**
Posts: 62


View Profile
« Reply #2 on: February 26, 2015, 02:13:06 AM »

Thank's for the second solution, that's perfect !
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!