Authored by biao

switch to jquery as Liangzhifeng comments. code review by bikai

... ... @@ -6,7 +6,7 @@
var $ = require('jquery');
var loading = require('../plugin/loading'),
tip = require('../plugin/tip');
tip = require('../plugin/tip'),
Hammer = require('yoho.hammer');
var theOrderCode = document.getElementById('ordercode').value;
... ... @@ -100,13 +100,13 @@ function isWXOpen() {
}
function hideWeChatPay() {
var payApps = $('.app');
var $payApps = $('.app');
payApps.each(function(idx, app) {
if ($(app).attr('id') === 'weixin') {
$(app).parent().css('display', 'none');
return false;
}
$payApps.each(function(idx, app) {
if ($(app).attr('id') === 'weixin') {
$(app).parent().css('display', 'none');
return false;
}
});
}
... ... @@ -122,25 +122,25 @@ function setAppIcon(el, position) {
}
function loadIcon() {
var boxs = $('.box');
var div = null;
var $boxs = $('.box');
var $div = null;
var appid = null;
boxs.each(function(idx, box) {
div = $(box).find('.icon').find('div');
if (div.length > 0) {
$boxs.each(function(idx, box) {
$div = $(box).find('.icon').find('div');
if ($div.length > 0) {
appid = $(box).attr('id');
if (appid !== 'alipay') {
setAppIcon(div, appIconPosition[appid]);
setAppIcon($div, appIconPosition[appid]);
}
}
});
}
function showPage() {
var pageList = $('.payapp-list');
var $pageList = $('.payapp-list');
pageList.css('visibility', 'visible');
$pageList.css('visibility', 'visible');
}
if (wxHammer) {
... ...