开发者

How to Collapse and Expand sharepoint list using js

开发者 https://www.devze.com 2023-04-04 19:01 出处:网络
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

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

精彩评论

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