如何使用Twitter Bootstrap在页面加载时默认折叠折叠Div

时间:2013-08-20 02:02:49

标签: twitter-bootstrap

我的网页上有一个可折叠的div,在collaplse之间切换时工作正常:

问题是当网页加载“Plcollapse”时默认打开Div。

如何在页面加载时关闭Div

<button type="button" class="btn btn-success" data-toggle="collapse" data-target="#plcollapse">
    Create list
</button>
<br/>
<br/>
<div id="plcollapse" class="collapse in">

    <form >

        <fieldset>
            <div class="control-group">
                <label for="Title">Title</label>
                <input type="text" class="form-control" ng-model="plTitle" value="{{plTitle}}" id="titleInput" placeholder="Enter title">
            </div>
            <div class="control-group">
                <label for="Description">Description</label>
                <input type="text" class="form-control" ng-model="plDescription" value="{{plDescription}}" id="descriptionInput" placeholder="Enter description">
            </div>
            <div class="control-group">
                <label>Add one or more ...</label>
                <textarea id="videolist" ng-model="videolist" value="" style="width:40%"></textarea>
                <a ng-click="arrangePlaylistVideos()">Click here to arrange videos</a>
            </div>
            <button type="submit" class="btn btn-success" ng-click="CreatePlaylist()">Submit</button>
        </fieldset>
    </form>
</div>

1 个答案:

答案 0 :(得分:0)

尝试删除div中的“in”类

<div id="plcollapse" class="collapse">
   -----
</div>