Page 1 of 1

List Counter Value from code

Posted: Mon Jul 14, 2014 11:05 am
by Joe Bohen

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


List Counter Value from code

Posted: Mon Jul 14, 2014 11:34 am
by Evgene Karachevtsev

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/


List Counter Value from code

Posted: Mon Jul 14, 2014 2:07 pm
by Joe Bohen

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.


List Counter Value from code

Posted: Mon Jul 14, 2014 2:49 pm
by Kateryna Grynko

Hi Joe,

Let us know if you need any further help.