Skip to content

Instantly share code, notes, and snippets.

@sophiebits
Created January 2, 2009 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sophiebits/42652 to your computer and use it in GitHub Desktop.
Save sophiebits/42652 to your computer and use it in GitHub Desktop.
Index: src/offset.js
===================================================================
--- src/offset.js (revision 6020)
+++ src/offset.js (working copy)
@@ -50,7 +50,7 @@
jQuery.offset = {
initialize: function() {
if ( this.initialized ) return;
- var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, rules, prop, bodyMarginTop = body.style.marginTop,
+ var body = document.body, container = document.createElement('div'), innerDiv, checkDiv, table, td, rules, prop, bodyMarginTop = body.style.marginTop,
html = '<div style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"><div></div></div><table style="position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;"cellpadding="0"cellspacing="0"><tr><td></td></tr></table>';
rules = { position: 'absolute', top: 0, left: 0, margin: 0, border: 0, width: '1px', height: '1px', visibility: 'hidden' };
Index: src/core.js
===================================================================
--- src/core.js (revision 6020)
+++ src/core.js (working copy)
@@ -9,6 +9,9 @@
* $Rev$
*/
+// Speed up references to and allow munging of "window"
+var window = this;
+
// Map over jQuery in case of overwrite
var _jQuery = window.jQuery,
// Map over the $ in case of overwrite
Index: src/ajax.js
===================================================================
--- src/ajax.js (revision 6020)
+++ src/ajax.js (working copy)
@@ -497,7 +497,7 @@
// Get the JavaScript object, if JSON is used.
if ( type == "json" )
- data = eval("(" + data + ")");
+ data = window["eval"]("(" + data + ")");
}
return data;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment