Action sheet
Action sheet can show many action buttons for user to choose.
$.actions(buttons) - create and show Action Sheet.
buttons - buttons in action sheet, you can put buttons in different group.
{% highlight html %}
{% endhighlight %}
{% highlight js %}
$(document).on('click','.create-actions', function () {
var buttons1 = [
{
text: 'title',
label: true
},
{
text: 'Tom',
bold: true,
color: 'danger',
onClick: function() {
$.alert("you choose 'Tom'");
}
},
{
text: 'Bob',
onClick: function() {
$.alert("you choose 'Bob'");
}
}
];
var buttons2 = [
{
text: 'cancel',
bg: 'danger'
}
];
var groups = [buttons1, buttons2];
$.actions(groups);
});
{% endhighlight %}
You can set button color with color, or set background with bg. There are four different color: primary, success, warning, danger. In fact, the different color is defined in Text.