Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

List Counter Value from code

I wish to set the value of the counter in a list item,

From:

<!--<span class="ui-li-count ui-body-a"0</span--

To:

<!--<span class="ui-li-count ui-body-a"5</span--

How do I achieve this from code.

Regards,
Joe

Evgene Karachevtsev
Posts: 12
Joined: Mon Apr 28, 2014 1:12 pm

List Counter Value from code

Hello Joe,

Using jQuery you may find the element you want on the page http://api.jquery.com/find/ and change its contents http://api.jquery.com/text/

Joe Bohen
Posts: 0
Joined: Wed Nov 28, 2012 11:28 am

List Counter Value from code

Hi, I found the most direct method was to use:

$('#Jobslist_pge_msg_item span').text('13');

Where Jobslist_pge_msg_item was the true ID.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

List Counter Value from code

Hi Joe,

Let us know if you need any further help.

Return to “Issues”