Hi there. I recently ran into this exact same problem and tore out what
remained of my hair figuring it out.

The problem is not with jQuery or JavaScript, but with IE allowing CSS to
affect how it handles the numbering of ordered list items.

Here's a page describing the problem:
http://www.satzansatz.de/cssd/onhavinglayout.html#list ... the whole article
is worth the read; scroll up for a more complete description of "hasLayout".

I ended up reworking my CSS to ensure my list items didn't invoke IE's
layout issue, and was then able to dynamically add <li> elements and have
them renumber as expected without having to mess with @start=x.

Hope this helps.



On 2/6/07, Paul McLanahan <[EMAIL PROTECTED]> wrote:

I can't reproduce the problem. I've tried a similar script in IE6 and
IE7 and they both behave nicely when using append() and prepend() on
an OL element. Could you post a link to a page with your full example
on it, or post more code? Also, I tested with jQuery version 1.1.1,
are you using an older version perhaps?

Are you adding these LIs in a $().ready(), or in a function that fires
as a result of some user interaction?

On 2/6/07, Joel Noble <[EMAIL PROTECTED]> wrote:
>
> I've got a little code snippit that adds LI elements to an
> ordered list (OL).  In Firefox, the added elements get their
> own numbers and all is good.  In IE, every element is added
> as #1.  (The LI is added, but each one shows as #1).
>
> Here's what I'm doing to add the elements:
>
> $('#mylist').append('<li id="'+ listItemId +'">' + textToShow +
'</li>');
>
> Is there anything I can call after adding to prompt IE
> to "renumber" the elements of the OL?
>
>
> Thanks!
>
>
> Joel Noble
> [EMAIL PROTECTED]
>
>
>
> _______________________________________________
> jQuery mailing list
> discuss@jquery.com
> http://jquery.com/discuss/
>


--
"I don't know karate, but I know KA-RAZY!!!!"
-- James Brown

_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/




--
_____________________________________
Brad Brizendine
CTO, Glyphix http://www.glyphix.com/
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to