谷歌地图左侧面板 [英] left panel on google map
本文介绍了谷歌地图左侧面板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在谷歌地图上制作一个隐藏左侧面板?
我创建了一个面板但它没有在地图上显示它?
how can I make a hide-left panel on google map?
I create a panel but it does not show it on map?
<script type="text/javascript">
$(function(){
$(document).on('click','.slider-arrow.show',function(){
$( ".slider-arrow, .panel" ).animate({
left: "+=300"
}, 700, function() {
// Animation complete.
});
$(this).html('«').removeClass('show').addClass('hide');
});
$(document).on('click','.slider-arrow.hide',function(){
$( ".slider-arrow, .panel" ).animate({
left: "-=300"
}, 700, function() {
// Animation complete.
});
$(this).html('»').removeClass('hide').addClass('show');
});
});
</script>
<style type="text/css">
.panel {
width:300px;
float:left;
height:550px;
background:#d9dada;
position:relative;
left:-300px;
}
.slider-arrow {
padding:5px;
width:10px;
float:left;
background:#d9dada;
font:400 12px Arial, Helvetica, sans-serif;
color:#000;
text-decoration:none;
position:relative;
left:-300px;
}
</style>
推荐答案
(function(){
(function(){
(document).on('click','。slider -arrow.show',function(){
(document).on('click','.slider-arrow.show',function(){
(.slider-arrow,.panel)。 animate({
left:+ = 300
},700,function(){
//动画完成。
});
( ".slider-arrow, .panel" ).animate({ left: "+=300" }, 700, function() { // Animation complete. });
这篇关于谷歌地图左侧面板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文