当我按下按钮时,如何从app.js
的弹出窗口重定向到另一个页面?我正在使用framework7提供的选项卡式预览模板,并在index.html上弹出菜单,当我按某个按钮时,它将转到其他选项卡
var orderPopup = app.popup.create({
content: '<div class="popup" id="order-popup">....</div>',
// Events
on: {
open: function(data) {
//insert picker data from & to value
var pickerFrom = app.picker.create({
inputEl: '#from-picker',
cols: [
{
textAlign: 'center',
values: ['Dukuh Pakis','Dukuh Kupang']
}
]
});
var pickerTo = app.picker.create({
inputEl: '#to-picker',
cols: [
{
textAlign: 'center',
values: ['Dukuh Pakis','Dukuh Kupang']
}
]
});
},
opened: function(data) {
$$("#order-popup #pesan").on('click',function() {
var from = $$('#order-popup #from-picker').val();
var to = $$('#order-popup #to-picker').val();
redirect: '/catalog/';
orderPopup.close();
// window.location.href = "catalog.html";
});
}
}
});