If nothing else, I can confirm being confused by alert() values versus console.* values in firebug. weird race condition? clobbered objects? something is going on. Please do not feel insane, I've seen this too :)
Regards. On Sunday 09 December 2007, Kim Johnson wrote: > Hi John, > > After doing a bunch more debugging, I think this might > be a strange firebug problem. I know it's not > jquery-related, but have you ever heard of firebug not > properly updating the code while debugging? What I > notice is that if I perform alerts before and after > the attr call, it does show the correct values for the > attributes I'm trying to overwrite (by just using > attr). THe problem was, the lines of code in firebug > were sometimes changing, mostly not, so I think I > inaccurately assumed it was a jquery problem. > > thanks! > -kim > > --- John Resig <[EMAIL PROTECTED]> wrote: > > Do you have some example code? That shouldn't fail > > for any particular reason. > > > > --John > > > > On Dec 9, 2007 4:30 AM, Kim Johnson > > > > <[EMAIL PROTECTED]> wrote: > > > Hi folks, > > > > > > I just spent the last hour trying to figure out > > > > why a > > > > > piece of jquery wasn't working, and finally > > > > tracked it > > > > > down to inaccurately assuming you could overwrite > > > > an > > > > > attribute with attr. Using attr to blank out > > > > values > > > > > (ex: .attr("name", "")) seems to work fine, but as > > > soon as I try to use it with an actual variable > > > > (ex: > > > .attr("id", idvar)), nothing happns. > > > > > > I finally discovered that the code worked > > > > perfectly if > > > > > I called removeAttr("id") first, prior to the > > > .attr("id", idvar) call. > > > > > > Can anyone explain to me why overwriting doesn't > > > > work > > > > > with attr? Is this a bug? Am I missing some kind > > > > of > > > > > core concept? > > > > > > Thanks, > > > ~Kim > > ___________________________________________________________________________ >_________ > > > > Never miss a thing. Make Yahoo your home page. > > > http://www.yahoo.com/r/hs > > > ___________________________________________________________________________ >_________ Never miss a thing. Make Yahoo your home page. > http://www.yahoo.com/r/hs