EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: iceh on October 22, 2013, 09:55:41 PM



Title: SplitButton - open menu on click - not on mouse over
Post by: iceh 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.


Title: Re: SplitButton - open menu on click - not on mouse over
Post by: stworthy 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>


Title: Re: SplitButton - open menu on click - not on mouse over
Post by: iceh 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.


Title: Re: SplitButton - open menu on click - not on mouse over
Post by: stworthy 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>


Title: Re: SplitButton - open menu on click - not on mouse over
Post by: iceh on August 16, 2014, 01:09:07 AM
Thanks a lot!