Todd Penny
Posts: 0
Joined: Sun Jan 12, 2014 4:29 pm

How do I get the 'value' for the List 'element counter' when the list is dynamically created from the results of a REST

Hi,

I have a List which is populated with the results from a REST service. I am populating both the label and the counter value. I need to capture the counter value associated with the list item the user clicks and save it to local storage so it can be used by the next page.

I have tried this approach and cannot get it to work?

alert($(this).find("[name=Counter]").text());

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

How do I get the 'value' for the List 'element counter' when the list is dynamically created from the results of a REST

Hello Todd,

Please use selector by .ui-li-count class, e.g:

$(this).find(".ui-li-count").text()

Return to “Issues”