我正在为手机间隙中的Windows,Android和iOS开发移动应用程序。我在Android和iOS中都有按钮点击事件,但在Windows手机中无效。
在该屏幕中,下拉和按钮。在Windows手机中,当我点击按钮时,下拉列表正在打开,而不是按钮
中的操作的index.html
<div id="selectSchoolDD" class="wrapper-dropdown-3">
<label id="school_Selection" for="school_Selection">Select School</label>
<ul class="dropdown" id="drop_down_school_list">
<!--<li><a href="#"><i class="icon-plane icon-large"></i>Select School</a></li>-->
</ul>
</div>
<button class="custom-button" type="submit" data-theme="a" id="schoolSelectButton">GO</button>
Java脚本
$(document).on('click', '#schoolSelectButton', function() {
alert("hello");
});
var dd = new DropDown( $('#selectSchoolDD') );
$(document).click(function() {
$('.wrapper-dropdown-3').removeClass('active');
});
function DropDown(el) {
this.dd = el;
this.opts = this.dd.find('ul.dropdown > li');
this.val = '';
this.index = -1;
this.initEvents();
}
DropDown.prototype = {
initEvents : function() {
var obj = this;
obj.dd.on('click', function(event){
$(this).toggleClass('active');
return false;
});
obj.opts.on('click',function(){
var opt = $(this);
obj.index = opt.index();
obj.val = selectedSchoolName[obj.index];
$('#school_Selection').empty();
$('#school_Selection').html(obj.val);
});
},
getValue : function() {
return this.val;
},
getIndex : function() {
return this.index;
}}
屏幕截图