mui jquery 同时使用

    (function ($, doc, $$) {
$.init();
$.ready(function () {
var cityPicker = new $.PopPicker({
layer:
}); $.ajax({
type: 'POST',
url: '@Url.Action("GetSelectList","Banji")',
data: '',
dataType: 'json',
success:function(data) {
cityPicker.setData(data);
},
error: function () {
alert('error');
}
}); var showCityPickerButton = doc.getElementById('showCityPicker');
var cityResult = doc.getElementById('cityResult');
var students = doc.getElementById('students');
showCityPickerButton.addEventListener('tap', function(event) {
cityPicker.show(function (items) {
cityResult.innerText = "" + items[].text + "->" + items[].text;
$$('#students').html('');
$.ajax({
type: 'POST',
url: '@Url.Action("GetSelectList","Student")',
data: { banjiId: items[].value },
dataType: 'json',
success: function (data) {
console.log(data);
var str = '';
data.forEach(function (e) {
str +='<li class="mui-table-view-cell mui-checkbox mui-left"><input name="checkbox" type="checkbox" value="'+ e.value +'">' + e.text + '</li>';
})
$$('#students').html(str);
},
error: function () {
alert('error');
}
}); //返回 false 可以阻止选择框的关闭
//return false;
});
}, false); });
})(mui, document, jQuery); </script>
上一篇:ObjectAnimator属性动画应用demo


下一篇:百度地图移动版API 1.2.2版本(Android)地图偏移的最佳解决办法