Why don't you use jQuery for that ?

var $li = $('<li />').attr('id', 'li_' +
this.nextCount).attr('class','bigbox_li');

--
Ariel Flesler
http://flesler.blogspot.com

On 22 jun, 03:52, "James Chen" <[EMAIL PROTECTED]> wrote:
> I think this is the culprit...
>
> i guess known issue with setAttribute that I didn't know about...
>
> id, class and like 20+ other attributes are reserved words thus doesn't work
> in IE7... although it looks like it's working... but it's not.
>
> There are lots of work arounds out there, i hope I can change the design so
> I don't need to do the work around...
>
>
>
> On Sat, Jun 21, 2008 at 10:11 AM, Rene Veerman <[EMAIL PROTECTED]> wrote:
> > I'm missing the appendChild() method in loadElements()
>
> > On Sat, Jun 21, 2008 at 10:22 AM, MysteryNerd <[EMAIL PROTECTED]> wrote:
>
> >> I'm in the process of converting standard javascript code to jQuery,
> >> it has already save tons of lines of code and make it more
> >> manageable.  I'm a bit stumped to why this works in FF and not in IE
> >> using jQuery bind.
>
> >> -- Snippets --
> >> var BigBox = {
> >>  init : function () {
> >>    ...
> >>    this.loadElements();
> >>    ...
> >>    $('.bigbox_li').bind("dbclick", function(e) {$
> >> (this).addClass("bigbox_li_active")});
> >>  },
>
> >>  loadElements : function() {
> >>    ...
> >>    var li = document.createElement("li");
> >>    li.setAttribute( "id", "li_" + this.nextCount); // nextCount
> >> ensure uniqueness
> >>    li.setAttribute( "class", "bigbox_li");
> >>    ...
> >>  }
> >> }
>
> >> I did check the DOM in IE using IE Developer toolbar, it does have the
> >> class "bigbox_li) associated with the li html element.
>
> >> Any help would be great! Spend a few hours on this already!- Ocultar texto 
> >> de la cita -
>
> - Mostrar texto de la cita -

Reply via email to