add showOrHideSlider method
This commit is contained in:
parent
4c6c9b1835
commit
57bab84fb1
10
js/demo.js
10
js/demo.js
|
@ -4,7 +4,7 @@
|
|||
* @Github:
|
||||
* @Date: 2019-12-11 09:17:17
|
||||
* @LastEditors: tangjiang
|
||||
* @LastEditTime: 2019-12-11 11:50:01
|
||||
* @LastEditTime: 2019-12-11 11:53:57
|
||||
*/
|
||||
$(document).ready(function () {
|
||||
$('#btn').on('click', function () {
|
||||
|
@ -39,8 +39,8 @@ $(document).ready(function () {
|
|||
});
|
||||
});
|
||||
|
||||
// 收缩左侧侧边栏
|
||||
$('.collpase-icon').on('click', function() {
|
||||
// 点击地图时,调用此方法
|
||||
function showOrHideSlider () {
|
||||
if ($('.fixed-left').hasClass('collpased')) {
|
||||
$('.fixed-left').removeClass('collpased');
|
||||
$('.map_header').css({left: 0});
|
||||
|
@ -57,6 +57,10 @@ $(document).ready(function () {
|
|||
} else {
|
||||
$(this).removeClass('icon-shouqi').addClass('icon-zhankai')
|
||||
}
|
||||
}
|
||||
// 收缩左侧侧边栏
|
||||
$('.collpase-icon').on('click', function() {
|
||||
showOrHideSlider();
|
||||
// $(this).hasClass('icon-zhankai')
|
||||
// ? $(this).removeClass('icon-zhankai').addClass('icon-shouqi')
|
||||
// : $(this).removeClass('icon-shouqi').addClass('icon-zhankai)
|
||||
|
|
Loading…
Reference in New Issue