News for hackers. Stuff that matters.
Re:Don’t let jQuery’s $(document).ready() slow you down by MBlume on Thursday August 19, 2010 @07:12PM (#1618992)
swap the first two lines:

  $.getJSON(my_url, function(data) {
    $(document).ready(function(){
      $('<p>').text(data.some_text).appendTo('#some_container);
    });
  });
Re:Don’t let jQuery’s $(document).ready() slow you down by photon_off on Thursday August 19, 2010 @07:19PM (#1619012)
Very clever. This works because $(document).ready will execute immediately if the page is already loaded.