javascript - How to have KendoPanel's all the sections expand -


i started using kendopanel , wanting expand segments of panel under condition. using following code achieve that:

var panelbar = $("#kendopanel").kendopanelbar();                     var kendopanelbar = panelbar.data().kendopanelbar;                     kendopanelbar.collapse($("li", panelbar.element)); 

seems contracting segments instead of expanding them. doing wrong?

please try below code snippet.

<ul id="mypanelbar">     <li class="k-state-active">first item                 <ul>                     <li>sub item 1</li>                     <li>sub item 2</li>                     <li>sub item 3</li>                     <li>sub item 4</li>                 </ul>     </li>     <li>second item                 <ul>                     <li>sub item 1</li>                     <li>sub item 2</li>                     <li>sub item 3</li>                     <li>sub item 4</li>                 </ul>     </li>     <li>third item                 <ul>                     <li>sub item 1</li>                     <li>sub item 2</li>                     <li>sub item 3</li>                     <li>sub item 4</li>                 </ul>     </li>     <li>fourth item                 <ul>                     <li>sub item 1</li>                     <li>sub item 2</li>                     <li>sub item 3</li>                     <li>sub item 4</li>                 </ul>     </li>     <li>fifth item                 <ul>                     <li>sub item 1</li>                     <li>sub item 2</li>                     <li>sub item 3</li>                     <li>sub item 4</li>                 </ul>     </li> </ul>  <script>     var panelbar;     $(document).ready(function () {         panelbar = $("#mypanelbar").kendopanelbar().data("kendopanelbar");         // expand item         panelbar.expand($("#mypanelbar li.k-item"));     }); </script> 

let me know if concern.


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -