jquery document.ready multiple declaration

Posted by Hendry H. on Stack Overflow See other posts from Stack Overflow or by Hendry H.
Published on 2012-11-29T10:17:31Z Indexed on 2012/11/29 11:05 UTC
Read the original article Hit count: 151

Filed under:
|
|

I realized that I can specify $(document).ready(function(){}); more than once.
Suppose like this

$(document).ready(function(){
    var abc = "1122";
    //do something..
});

$(document).ready(function(){
    var abc = "def";
    //do something..
});
  1. Is this standard ? Those codes work on my FF (16.0.2). I just a little afraid that other browser may not.
  2. What actually happen ? How jQuery handle those code ?

Thanks.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery