Reputation: 471
framwork 7 visit https://framework7.io/docs/action-sheet.html
actionsheet open but not working on other page to come this page. I think not initialize in page view
this is my js code
$$('.demo-actions').on('click', function () {
var buttons = [
{
text: 'Short By:',
label: true
},
{
text: 'XYZ',
bold:true,
},
{
text: 'ABC',
bold:true,
},
{
text: '123',
bold:true,
},
{
text: 'abc',
color: 'red'
},
];
myApp.actions(buttons);
});
this is html code
<a href="#" class="demo-actions buttons ">XYZ</a>
Upvotes: 2
Views: 580
Reputation: 471
Solution here :
$$(document).on('pageInit', function(e) {
refreshCalls();
});
refreshCalls();
function refreshCalls() {
/* ===== Action sheet, we use it on dashboard pages ===== */
$$('.demo-actions').on('click', function() {
var buttons = [{
text: 'Short By:',
label: true
}, {
text: 'XYZ',
bold: true,
}, {
text: 'ABC',
bold: true,
}, {
text: '123',
bold: true,
}, {
text: 'abc',
color: 'red'
}, ];
myApp.actions(buttons);
});
}
Upvotes: 5