Last week we have found an odd behaviour in some website that drove us crazy for a while. The bug was related with the append of jQuery that is used to insert content to the end of the matched elements and the height method used to get the computed height of an element. Look at this code:

//divSong is created with jQuery, added to the (DOM) in the next line
$('.song-list .songs').append(divSong);
currentPlaying.css('height', divSong.height());

This piece of code normally works without any problem, or should work, because In our case randomly the computed height of the dynamic div (divSong) returns 0px. It seems like the append sometimes behave asynchronously, so when we ask for the divs height it is still 0px due to the fact that it hasn't been added to the DOM tree yet. To test this we code the following workaround:

//divSong is a div created using jQuery added to the DOM in the next...

JSConf is a unique conference organization, because we aren't really a conference organization at all. We are a very loose federation of developers who share the same general idea about how a technical conference should be held. We don't believe that one model or process fits all communities, in fact we are big advocates of locally run events driven by passionate individuals dedicated to the community. We make events that aren't from the standard conference playbook because we believe you (attendees, speakers, and sponsors) deserve more than that. We focus on two things, pushing the boundaries of what is thought to be conceivable with JS and providing exceptional human social activities that encourage community and friendship building.

JSConf is a unique conference organization, because we aren't really a conference organization at all. We are a very loose federation of developers who share the same general idea about how a technical conference should be held. We don't believe that one model or process fits all communities, in fact we are big advocates of locally run events driven by passionate individuals dedicated to the community. We make events that aren't from the standard conference playbook because we believe you (attendees, speakers, and sponsors) deserve more than that. We focus on two things, pushing the boundaries of what is thought to be conceivable with JS and providing exceptional human social activities that encourage community and friendship building.