Skip to main content

Bug Tracker

Side navigation

#785 closed bug (fixed)

Opened January 11, 2007 06:09PM UTC

Closed January 12, 2007 07:28AM UTC

Last modified June 19, 2007 08:49AM UTC

addClass doesn't seem to work when in an ajax callback that returns nothing

Reported by: rich.manalang@gmail. Owned by:
Priority: major Milestone: 1.1
Component: core Version: 1.1
Keywords: css addclass Cc:
Blocked by: Blocking:
Description

Consider the following code...

$.get(serviceURI,{'parm':'1'},function(data){
  $(node).append(data).addClass("someclass");
})

The addClass method doesn't seem to work in 1.1b when the ajax response is blank. It works fine if the response returns a value. Also, it worked fine in 1.0.4 when the response was blank as well.

Attachments (0)
Change History (3)

Changed January 11, 2007 07:45PM UTC by joern comment:1

description: Consider the following code...\ \ $.get(serviceURI,{'parm':'1'},function(data){\ $(node).append(data).addClass("someclass");\ })\ \ The addClass method doesn't seem to work in 1.1b when the ajax response is blank. It works fine if the response returns a value. Also, it worked fine in 1.0.4 when the response was blank as well.Consider the following code...\ \ {{{\ $.get(serviceURI,{'parm':'1'},function(data){\ $(node).append(data).addClass("someclass");\ })\ }}}\ \ The addClass method doesn't seem to work in 1.1b when the ajax response is blank. It works fine if the response returns a value. Also, it worked fine in 1.0.4 when the response was blank as well.

I can't confirm this. Can you provide a test page? Are you sure the callback is called at all? If the response is empty, the append call doesn't do anything, too.

Changed January 12, 2007 05:14AM UTC by rich.manalan comment:2

Changed January 12, 2007 07:28AM UTC by john comment:3

resolution: → fixed
status: newclosed
version: 1.1a1.1

This has been fixed in SVN. Doing .append("") caused an error to occur.