I can't figure out how i might fly out a split button programmatically. My toolbar has an "export" function that is controlled with a split button. I want the user to be able to click on any part of the button to expand the options. However, the out of the box functionality is set up to only show the options when the user clicks directly on the little arrow of the split button.
I've got a way to do it, but it feels a bit messy. What i'm doing right now is detecting the click on the main body of the split button, and then i have to set a timeout and fire both mouse down and mouse up on the arrow:
btnClicked = e.target.closest(
btnSplitParent = btnClicked.closest(
(btnSplitParent.length > 0 && !btnClicked.hasClass(
Is there a better way to accomplish this same thing?