点击展开点击收起

<span id="toggle" title="点击关闭" href="javascript:void(0);" class="close">点击收起</span>

<div class="bottomBg" id="content">
        <div class="bottom_form">
            <form  method="get">
                <input type="text" class="bot_name" name="" id="bot_name" value="请输入2—5个字中文名字" />
                <input type="text" class="bot_mobile" id="bot_moblie" value="请输入手机号码或者固话"/>
                <button>立即预约</button>
            </form>
        </div>
        </div>

JS:

$(function(){
                $(function() {
                $("#toggle").click(function() {
                    $(this).text($("#content").is(":hidden") ? "点击收起" : "点击展开");
                    $("#content").slideToggle();
                });
            });
            })

 

posted @ 2015-03-27 18:01  Xpress  阅读(917)  评论(0编辑  收藏  举报