So rufen Sie eine Funktion innerhalb von $ (Dokument) .ready von außerhalb auf

Wie nennt man die Funktion lol() außerhalb von $(document).ready () - Beispiel:

$(document).ready(function(){  
  function lol(){  
    alert('lol');  
  }  
});  

Versucht:

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

Und einfach:

lol();

Es muss aufgerufen werden, innerhalb einer Außenseite javascript wie:

function dostuff(url){
  lol(); //call the function lol() thats inside the $(document).ready()
}

InformationsquelleAutor der Frage Marcus Showalter | 2010-03-04

Schreibe einen Kommentar