# \[JQuery\] Creating numbered headings with JQuery accordion

**URL:** <https://forum.kirupa.com/t/jquery-creating-numbered-headings-with-jquery-accordion/323682>\
**Category:** web dev\
**Created:** [July 12, 2011, 3:01pm UTC](https://forum.kirupa.com/t/jquery-creating-numbered-headings-with-jquery-accordion/323682 "2011-07-12T15:01:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zzxjoanw](https://avatars.discourse-cdn.com/v4/letter/z/b5e925/32.png) [@zzxjoanw](https://forum.kirupa.com/u/zzxjoanw)\
**Post date:** [July 12, 2011, 3:01pm UTC](https://forum.kirupa.com/t/jquery-creating-numbered-headings-with-jquery-accordion/323682/1 "2011-07-12T15:01:54Z")

</div>

A client has asked me to add numbers to their FAQ which uses JQuery Accordion. I don’t want to do this manually in case I have to renumber the entries, and using an \<ol\> breaks the accordion. So I tried this

```auto
var ctr:int = 0;
$('a.numbered').each(function(){$(this).innerHTML = String(ctr)+". "+$(this).innerHTML; ctr++})

```

and the Accordion still works, but I don’t get any numbers.

Help a JQuery noob?
