EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jahangir on February 16, 2019, 01:45:34 AM



Title: Hide ul in easyui-accordion
Post by: jahangir on February 16, 2019, 01:45:34 AM
How can I hide ul eliment in easyui-accordion if it has no childeren.


Title: Re: Hide ul in easyui-accordion
Post by: jarry on February 16, 2019, 06:18:56 AM
Detect the children elements in the <ul>. Hide it when no children exist.
Code:
var ul = $('#ul');
if (!ul.children().length){
ul.hide();
}


Title: Re: Hide ul in easyui-accordion
Post by: jahangir on February 18, 2019, 12:00:07 AM
Thank's jarry it works.