当前位置: 动力学知识库 > 问答 > 编程问答 >

cordova - Phone Gap: Button click is not working in Windows phone

问题描述:

I am developing a mobile application for windows, android and iOS in phone gap.I have button click event in a screen that is working in both Android and iOS , but not working in Windows phone.

In that screen a Drop down and a Button. In Windows phone when I click the button, drop down is opening instead of action in button

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 Script

 $(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;

}}

Screen Shoot

分享给朋友:
您可能感兴趣的文章:
随机阅读: