|
@@ -1768,9 +1768,11 @@ Manage.prototype.loadAudio = function () {
|
|
|
if (state) {
|
|
|
$('#volume a img').attr('src', './images/Volume btn_off.png');
|
|
|
$('#volume').attr('title', '关闭声音');
|
|
|
+ $('#volume').addClass('active');
|
|
|
} else {
|
|
|
$('#volume a img').attr('src', './images/Volume btn_on.png');
|
|
|
$('#volume').attr('title', '打开声音');
|
|
|
+ $('#volume').removeClass('active');
|
|
|
}
|
|
|
},
|
|
|
});
|
|
@@ -1793,11 +1795,10 @@ Manage.prototype.loadAudio = function () {
|
|
|
});
|
|
|
|
|
|
$('#volume')
|
|
|
- .find('a')
|
|
|
- .on('click', () => {
|
|
|
- if ($('#volume img')[0].src.indexOf('btn_on.png') > -1) {
|
|
|
+ .on('click', (e) => {
|
|
|
+ if (!$('#volume').hasClass('active')) {
|
|
|
this.switchBgmState(true);
|
|
|
- } else if ($('#volume img')[0].src.indexOf('btn_off.png') > -1) {
|
|
|
+ } else {
|
|
|
this.switchBgmState(false);
|
|
|
}
|
|
|
});
|