Ich habe ein seltsames Problem mit dem Standort einer Funktion. Ist die Funktion innerhalb der $(document).ready Funktion aktiviert und die äußere als Kommentar gekennzeichnet dann wird der Funktionsaufruf nicht erkannt. Ist jedoch die innere Funktion als Kommentar und die äußere aktiv, dann funktioniert es. Kann das jemand erklären?
In der Folge ein Auszug des Codes.
In der Folge ein Auszug des Codes.
Code:
$(document).ready( function() {
myPoint = new Point();
Point = function(x, y) {
this.x = x || 0;
this.y = y || 0;
};
});
//Point = function(x, y) {
// this.x = x || 0;
// this.y = y || 0;
//};