开发者

How to Collapse and Expand sharepoint list using js

I have one checkbox if i check it collapse the shrepoint list, if i unchec开发者_如何学JAVAk it it should expand all how to do this.


If you want to hide it you can use JavaScript to add the hide style to it.

function checkboxHandler() {
    var el = document.getElementById('yourCheckBoxId');
    if(el.value){
       document.getElementById('sharePointId').setAttribute('style', 'display:none;');
    }else{
       document.getElementById('sharePointId').setAttribute('style', 'display:block;');
    }
}

If you were to use a nice JavaScript library like jQuery you can make this code simpler and add some sweet animations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜