Using the Oraclejet framework, I was trying to make a splitbutton which has only 2 options. How can I differentiate them so that each go to their own function? Or how can I paste the text of selected to function as parameter?
It was something like this
<div id="dialogWrapper" style="position:relative; max-height:1%; max-width:1%;">
<button id="printPdf" style="margin-right:6px;"data-bind="
ojComponent: {component: 'ojButton',
menu:'#choices'
}"/>
The menu inside:
<ul id="choices" style="display:none"
data-bind="ojComponent: {component: 'ojMenu', select: print//here both of them call to same function}">
<li id="PDF">
a href="#"><span class=""></span>PDF</a>
</li>
<li id="Excel">
<a href="#"><span class=""></span>Excel</a>
</li>
</ul>
</div>