SORU
6 Aralık 2011, Salı


jQuery - Ne farklar(belge) $arasında.ve(pencere) hazır dolar.yük?

Arasındaki farklar nelerdir

$(document).ready(function(){
 //my code here
});

ve

$(window).load(function(){
  //my code here
});

Ve emin olmak istiyorum

$(document).ready(function(){

}) 

ve

$(function(){

}); 

ve

jQuery(document).ready(function(){

});

aynı.

Ve aralarında benzerlikler ne olduğunu söyleyebilir misiniz?

CEVAP
6 Aralık 2011, Salı


$(document).ready(function() {
 // executes when HTML-Document is loaded and DOM is ready
 alert("document is ready");
});


$(window).load(function() {
 // executes when complete page is fully loaded, including all frames, objects and images
 alert("window is loaded");
});

Bunların hepsi eşdeğer

$(function(){
}); 

jQuery(document).ready(function(){
});

$(document).ready(function(){
});

$(document).on('ready', function(){
})

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • ChasesAndCrashes

    ChasesAndCra

    31 Temmuz 2009
  • Blu animations and other videos

    Blu animatio

    15 HAZİRAN 2007
  • placeboing

    placeboing

    7 Mart 2006