const audioList = {};
function _play(key) {
if (audioList[key]) {
audioList[key].autoplay = true;
} else {
var audio1 = new Audio
audio1.src = '../audio/1.mp3';
audio1.autoplay = true;
audioList[key] = audio1;
}
}
function _off(key) {
if (audioList[key]) {
audioList[key].autoplay = false;
}
}
function _switch(key) {
if (audioList[key]) {
audioList[key].autoplay = !audioList[key].autoplay;
}
}
$(window).scroll(function() { /* some code */ });
var top = $('#filter_wrap').offset().top;
if ($(window).scrollTop() >= top) {
$('#filter_wrap').css({
posiotion: "fixed"
});
} else {
$('#filter_wrap').css({
posiotion: "static"
});
}
var openDialog = function(uri, name, options, closeCallback) {
var win = window.open(uri, name, options),
interval = window.setInterval(function() {
try {
if (win == null || win.closed) {
window.clearInterval(interval);
closeCallback(win);
}
}
catch (e) {
}
}, 1000);
return win;
};