53 lines
1.6 KiB
JavaScript
53 lines
1.6 KiB
JavaScript
/*
|
|
* @Description:
|
|
* @Author: tangjiang
|
|
* @Github:
|
|
* @Date: 2019-12-11 09:17:17
|
|
* @LastEditors: tangjiang
|
|
* @LastEditTime: 2019-12-11 16:50:36
|
|
*/
|
|
$(document).ready(function () {
|
|
|
|
// 用户登录信息
|
|
$('.drop-down').on('mouseover', function () {
|
|
$('.drop-down-list').show();
|
|
}).on('mouseout', function () {
|
|
var timer = setTimeout(function () {
|
|
$('.drop-down-list').hide();
|
|
}, 300);
|
|
$('.drop-down-list').on('mouseover', function () {
|
|
clearTimeout(timer);
|
|
$('.drop-down-list').show();
|
|
}).on('mouseout', function () {
|
|
$('.drop-down-list').hide();
|
|
});
|
|
});
|
|
|
|
// 点击地图时,调用此方法
|
|
function showOrHideSlider () {
|
|
if ($('.fixed-left').hasClass('collpased')) {
|
|
$('.fixed-left').css({ left: '-400px'}).removeClass('collpased').removeClass('active');
|
|
$('.left_echart').css({left: '-400px'});
|
|
$('.screen-btn').css({left: '-50px'});
|
|
} else {
|
|
$('.fixed-left').css({ left: '0px' }).addClass('collpased');
|
|
$('.left_echart').css({left: '0px'});
|
|
$('.screen-btn').css({ left: '360px' });
|
|
}
|
|
|
|
if ($('.collpase-icon').hasClass('icon-zhankai')) {
|
|
$('.collpase-icon').removeClass('icon-zhankai').addClass('icon-shouqi')
|
|
} else {
|
|
$('.collpase-icon').removeClass('icon-shouqi').addClass('icon-zhankai')
|
|
}
|
|
}
|
|
|
|
// 收缩左侧侧边栏
|
|
$('.collpase-icon').on('click', function() {
|
|
if ($('.fixed-left').hasClass('active')) return;
|
|
showOrHideSlider();
|
|
// $(this).hasClass('icon-zhankai')
|
|
// ? $(this).removeClass('icon-zhankai').addClass('icon-shouqi')
|
|
// : $(this).removeClass('icon-shouqi').addClass('icon-zhankai)
|
|
})
|
|
}); |