请你看看
{{3p>
让我知道为什么我无法为toc
div设置动画?
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" id="wrapper">
<div id="map"></div>
<div id="toc">
<div class="row">
<div class="pull-right"><a href="#" id="slidetoLeft"><span class="glyphicon glyphicon-arrow-right"></span> </a>
</div>
</div>
</div>
</div>
和jquery是:
$("#slidetoLeft").on("click", function () {
$("#toc").animate({
"left": "0px",
"slow");
});
答案 0 :(得分:1)
我已经更新了你的小提琴。改变了像
这样的代码 $(".glyphicon").click(function (e) {
e.preventDefault();
$("#toc").animate({ "left": "0px" }, "slow");
});