Chrome上でonClickが正常に動作しているSenchaのリスト行にhtmlを追加しました& WindowsではSafariですが、iPadではクリックイベントは機能しません。 iPadでの実践例を教えてください。ipadで動作していないリストのdivをクリックするイベントをクリック
煎茶フィドル例: 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 !");
}
はい、うまくいきます、ありがとう... –