Page 1 of 1

auto divider alternative text

Posted: Sat Jul 26, 2014 10:05 pm
by Dirk Gissing

Hello,

I've used the information from another topic to try and get my auto divider filled with alternative text. This is the topic I've viewed: https://getsatisfaction.com/apperyio/...

I've tried the solution provided by Yves and the staff of Appery on that topic, but I still can't seem to get it right...

This is what happens with my dividers:
Image

As you can see, the dividers are all separate from the data and are not auto-dividing the data.

This is what I have done:
Made a list named "progg", made two items: one called program (this is where the data is) and one called "ProgDivider". I have followed every step provided by Yves, but I did not use Load but Page Show, because my data get's refreshed every time a user clicks on it.

Please advise!


auto divider alternative text

Posted: Sun Jul 27, 2014 6:38 pm
by Dirk Gissing

No help yet??


auto divider alternative text

Posted: Sun Jul 27, 2014 10:42 pm
by Yurii Orishchuk

Hi Dirk,

Please add to your list service "success" event handler and populate it with following code:

pre

//Note: you should replace "mobilelist_41" with your list component name.
var listName = "mobilelist_41";

var deviderOrder = 0;

Appery(listName).listview({
autodividers: true,

Code: Select all

 autodividersSelector: function (li) { 
     // Here is a place where you need return autodevider text. 
     return "AutoDevider[" + deviderOrder++ + "] = " + li.text().trim(); 
 } 

});

Appery(listName).listview("refresh"); //Refresh list component
Appery(listName).trigger("listviewcreate"); //Initiate dividers creation

//Delete this line of code if you need first item autoDevider.
Appery(listName).find("li").eq(0).hide(); //Hide first unused divider

/pre

See details on screen shot: http://prntscr.com/46z3xu/direct

Regards.


auto divider alternative text

Posted: Sun Jul 27, 2014 10:55 pm
by Yurii Orishchuk

Hi Dirk,

Please add to your list service "success" event handler and populate it with following code:

pre

//Note: you should replace "mobilelist_41" with your list component name.
var listName = "mobilelist_41";

var deviderOrder = 0;

Appery(listName).listview({
autodividers: true,

Code: Select all

 autodividersSelector: function (li) { 
     // Here is a place where you need return autodevider text. 
     return "AutoDevider[" + deviderOrder++ + "] = " + li.text().trim(); 
 } 

});

Appery(listName).listview("refresh"); //Refresh list component
Appery(listName).trigger("listviewcreate"); //Initiate dividers creation

//Delete this line of code if you need first item autoDevider.
Appery(listName).find("li").eq(0).hide(); //Hide first unused divider

/pre

See details on screen shot: http://prntscr.com/46z3xu/direct

Regards.