我在Sencha list list中添加了html,onClick在Chrome上工作正常& Windows上的Safari,但點擊事件不能在iPad上工作。 請讓我知道任何建議,使例子在iPad上工作。click event to div in ipad
煎茶小提琴實施例: http://www.senchafiddle.com/#MadlC#SPOJb#psFLV
代碼:
var store = Ext.create('Ext.data.Store', {
fields: ['htmlRow'],
autoLoad: true,
});
store.add([{ "htmlRow": "<div onclick='func_click1();' style='background:gray;width:70px;float:left'>Click 1</div><div onclick='func_click2()' style='background:yellow;width:70px;float:left'>Click 2</div>" }]);
store.add([{ "htmlRow": "Edt"}]);
store.add([{ "htmlRow": "Jamie"}]);
store.add([{ "htmlRow": "Aaron"}]);
store.add([{ "htmlRow": "Dave"}]);
store.add([{ "htmlRow": "Michael"}]);
store.add([{ "htmlRow": "Abraham"}]);
store.add([{ "htmlRow": "Jay"}]);
//define the application
Ext.application({
launch: function() {
Ext.Viewport.add({
width: '100%',
height: '100%',
centered: true,
hideOnMaskTap: false,
layout: 'fit',
items: [{
xtype: 'list',
disableSelection:true,
itemTpl: '<strong>{htmlRow}</strong>',
store: store
}]
});
}
});
function func_click1(){
alert("Why This Click 1 Working on Safari and Google Chrome in Windows, But Not Working on Ipad !");
}
function func_click2(){
alert("Why This Click 2 Working on Safari and Google Chrome in Windows, But Not Working on Ipad !");
}
是的,它的工作,謝謝你... –