EasyUI Forum
May 16, 2024, 04:26:49 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: SplitButton - open menu on click - not on mouse over  (Read 8880 times)
iceh
Jr. Member
**
Posts: 61


View Profile
« on: October 22, 2013, 09:55:41 PM »

Hi,

is there a way to open the menu of a splitbutton via click to the arrow
and not by mouse over?

Thx.
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: October 22, 2013, 11:33:50 PM »

Try increasing the 'duration' property value.
Code:
<a href="#" class="easyui-splitbutton" data-options="menu:'#mm1',iconCls:'icon-edit',duration:99999999">Edit</a>
Logged
iceh
Jr. Member
**
Posts: 61


View Profile
« Reply #2 on: August 15, 2014, 08:56:08 AM »

I noticed a small issue.

The opened menu doesn't autoclose in 100% of all cases.

Any hint how i can fix this?

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


View Profile Email
« Reply #3 on: August 15, 2014, 03:25:16 PM »

By default the menu will use the same 'duration' value as the button used. To let the menu auto hide when the mouse leaving it, try to set the 'duration' value when the menu displays.
Code:
	<a href="#" class="easyui-splitbutton" data-options="menu:'#mm1',iconCls:'icon-edit',duration:99999999">Edit</a>

<div id="mm1" data-options="
onShow: function(){
$(this).menu('options').duration = 200;
}
">
<div>MenuItem1</div>
<div>MenuItem2</div>
<div>MenuItem3</div>
<div>MenuItem4</div>
</div>
Logged
iceh
Jr. Member
**
Posts: 61


View Profile
« Reply #4 on: August 16, 2014, 01:09:07 AM »

Thanks a lot!
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!