EasyUI Forum
September 14, 2025, 07:21:29 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Center methods not available  (Read 6499 times)
Hoffiric
Newbie
*
Posts: 5


View Profile
« on: September 28, 2015, 04:16:36 AM »

Hello

I've found the method(s) for centering windows in the doc, where it says they are available from version 1.3.1 on. I am running version 1.4.3 and yet these methods are nowhere to be found.

Code:
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#client_create').center();">Center window</a><br>
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#client_create').window('close');">Close window</a>

<div id="client_create" class="easyui-window" data-options="title:'Create a client',inline:true,closable:false,iconCls:'icon-add'" style="width: 500px; height: 200px; padding: 10px">Test</div>

According to the documentation the center methods should be equally available as the window method that is being used to set certain properties. However the above example, where Close window works, Center window creates an error:

Quote
TypeError: $(...).center is not a function

So what's happening here!?

Thank you!
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: September 28, 2015, 08:17:59 PM »

The 'center' method must be called as below:
Code:
$('#client_create').window('center');
Logged
Hoffiric
Newbie
*
Posts: 5


View Profile
« Reply #2 on: September 29, 2015, 02:39:22 AM »

Okay, note to self: methods are really just parameters for another method and not an actual method. thanks for clearing that up.
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!