others.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. //header 菜单
  2. $(function () {
  3. var banner = new Swiper('.banner',{
  4. autoplay: 5000,
  5. pagination : '.swiper-pagination',
  6. paginationClickable: true,
  7. lazyLoading : true,
  8. loop:true
  9. });
  10. $('a.slide-menu').on('click', function(e){
  11. var wh = $('div.wrapper').height();
  12. $('div.slide-mask').css('height', wh).show();
  13. $('aside.slide-wrapper').css('height', wh).addClass('moved');
  14. });
  15. $('div.slide-mask').on('click', function(){
  16. $('div.slide-mask').hide();
  17. $('aside.slide-wrapper').removeClass('moved');
  18. });
  19. });
  20. (function($, doc) {
  21. $.init();
  22. $.ready(function() {
  23. var userPicker = new $.PopPicker();
  24. userPicker.setData([{
  25. value: '',
  26. text: '支付宝'
  27. }, {
  28. value: '',
  29. text: '微信'
  30. }]);
  31. var showUserPickerButton = doc.getElementById('showUserPicker');
  32. var userResult = doc.getElementById('userResult');
  33. showUserPickerButton.addEventListener('tap', function(event) {
  34. userPicker.show(function(items) {
  35. userResult.innerText = JSON.stringify(items[0]);
  36. });
  37. }, false);
  38. });
  39. })(mui, document);
  40. (function($, doc) {
  41. $.init();
  42. $.ready(function() {
  43. var userPicker = new $.PopPicker();
  44. userPicker.setData([{
  45. value: '',
  46. text: '现金'
  47. }, {
  48. value: '',
  49. text: '现金+积分'
  50. }]);
  51. var showUserPickerButton = doc.getElementById('showUserPickerthree');
  52. var userResult = doc.getElementById('userResult');
  53. showUserPickerButton.addEventListener('tap', function(event) {
  54. userPicker.show(function(items) {
  55. userResult.innerText = JSON.stringify(items[0]);
  56. });
  57. }, false);
  58. });
  59. })(mui, document);
  60. (function($, doc) {
  61. $.init();
  62. $.ready(function() {
  63. var userPicker = new $.PopPicker();
  64. userPicker.setData([{
  65. value: '',
  66. text: '安徽'
  67. }, {
  68. value: '',
  69. text: '湖南'
  70. }]);
  71. var showUserPickerButton = doc.getElementById('showUserPickertwo');
  72. var userResult = doc.getElementById('userResult');
  73. showUserPickerButton.addEventListener('tap', function(event) {
  74. userPicker.show(function(items) {
  75. userResult.innerText = JSON.stringify(items[0]);
  76. });
  77. }, false);
  78. });
  79. })(mui, document);