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