Page 1 of 1

List Item Auto Divider

Posted: Fri Feb 06, 2015 5:54 pm
by M&M

hi,

How can I programmatically show / hide the auto divider for list component?

Thanks


List Item Auto Divider

Posted: Fri Feb 06, 2015 11:35 pm
by Alena Prykhodko

Hello,

This hides first unused divider :
preApperyio('listName').find("li").eq(0).hide(); /pre


List Item Auto Divider

Posted: Sat Feb 07, 2015 4:56 am
by M&M

So I cannot turn off all the dividers or turn them on by setting the property?

So do I have to loop the list to show / hide all the dividers?

Is there a propery of the list item that I can check to see if the list item is a divider? I think I can read the text and see if it is single character and assume that it is a divider. But that does not seem like a elegant solution

Thanks


List Item Auto Divider

Posted: Tue Feb 10, 2015 1:18 am
by Yurii Orishchuk

Hi M&M,

Here is a solution to hide or show autodeviders.

  1. Create new CSS asset.

  2. Populate it with following JS code:

    pre

    .list_disableautodevider_true .ui-li-divider{
    display: none;
    }

    /pre

  3. Then you can use following JS code to hide auto deviders:

    pre

    //Where "mobilelist_258" is your list component name.
    Apperyio("mobilelist_258").addClass("list_disableautodevider_true")

    /pre

  4. Also you can use following JS code to show auto deviders:

    pre

    //Where "mobilelist_258" is your list component name.
    Apperyio("mobilelist_258").removeClass("list_disableautodevider_true")

    /pre

    Regards.