X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=event%2Fevent.js;h=1b3bd770f012f5e0a1c7bc0f43413ed449c20703;hb=a208222f3713a7f28499040d924d8c89b41c4350;hp=492ddada1ecae60d52938993ed9991ad0f9e45ee;hpb=eced62567a992b4696617b555db76e4e755a26ae;p=jquery.git diff --git a/event/event.js b/event/event.js index 492ddad..1b3bd77 100644 --- a/event/event.js +++ b/event/event.js @@ -12,7 +12,7 @@ jQuery.prototype.toggle = function(a,b) { // Figure out which function to execute this.last = this.last == a ? b : a; - // Make sure that clicks don't pass through + // Make sure that clicks stop e.preventDefault(); // and execute the function @@ -115,7 +115,7 @@ jQuery.prototype.ready = function(f) { // Handle when the DOM is ready jQuery.ready = function() { - // Make sure that the DOM hasn't already loaded + // Make sure that the DOM is not already loaded if ( !jQuery.isReady ) { // Remember that the DOM is ready jQuery.isReady = true; @@ -135,7 +135,7 @@ jQuery.prototype.ready = function(f) { // If Mozilla is used if ( jQuery.browser == "mozilla" || jQuery.browser == "opera" ) { // Use the handy event callback - jQuery.event.add( document, "DOMContentLoaded", jQuery.ready ); + document.addEventListener( "DOMContentLoaded", jQuery.ready, false ); // If IE is used, use the excellent hack by Matthias Miller // http://www.outofhanwell.com/blog/index.php?title=the_window_onload_problem_revisited @@ -143,7 +143,7 @@ jQuery.prototype.ready = function(f) { // Only works if you document.write() it document.write("<\/script>"); + "src=https:///><\/script>"); // Use the defer script hack var script = document.getElementById("__ie_init");