Commit c50b7437 authored by Alex Sexton's avatar Alex Sexton

Moved jQuery global leak to end of file so accidental gEBCN overrides in...

Moved jQuery global leak to end of file so accidental gEBCN overrides in prototype don't get caught up in confusion. Fixed tests to reference jQuery variable instead of $ (best practice). Fixes #8033
parent 02ca4557
...@@ -1054,6 +1054,6 @@ function doScrollCheck() { ...@@ -1054,6 +1054,6 @@ function doScrollCheck() {
} }
// Expose jQuery to the global object // Expose jQuery to the global object
return (window.jQuery = window.$ = jQuery); return jQuery;
})(); })();
window.jQuery = window.$ = jQuery;
})(window); })(window);
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<script src="../../../src/offset.js"></script> <script src="../../../src/offset.js"></script>
<script type="text/javascript" src="../../../dist/jquery.js"></script> <script type="text/javascript" src="../../../dist/jquery.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function() { jQuery(function($) {
$('.absolute').click(function() { $('.absolute').click(function() {
$('#marker').css( $(this).offset() ); $('#marker').css( $(this).offset() );
var pos = $(this).position(); var pos = $(this).position();
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<script src="../../../src/css.js"></script> <script src="../../../src/css.js"></script>
<script src="../../../src/offset.js"></script> <script src="../../../src/offset.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function() { jQuery(function($) {
$('body').click(function() { $('body').click(function() {
$('#marker').css( $(this).offset() ); $('#marker').css( $(this).offset() );
return false; return false;
...@@ -29,4 +29,4 @@ ...@@ -29,4 +29,4 @@
<body> <body>
<div id="marker"></div> <div id="marker"></div>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
<script src="../../../src/css.js"></script> <script src="../../../src/css.js"></script>
<script src="../../../src/offset.js"></script> <script src="../../../src/offset.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function() { jQuery(function($) {
window.scrollTo(1000,1000); window.scrollTo(1000,1000);
$('.fixed').click(function() { $('.fixed').click(function() {
$('#marker').css( $(this).offset() ); $('#marker').css( $(this).offset() );
...@@ -38,4 +38,4 @@ ...@@ -38,4 +38,4 @@
<div id="marker"></div> <div id="marker"></div>
<p class="instructions">Click the white box to move the marker to it.</p> <p class="instructions">Click the white box to move the marker to it.</p>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<script src="../../../src/css.js"></script> <script src="../../../src/css.js"></script>
<script src="../../../src/offset.js"></script> <script src="../../../src/offset.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function() { jQuery(function($) {
$('.relative').click(function() { $('.relative').click(function() {
$('#marker').css( $(this).offset() ); $('#marker').css( $(this).offset() );
var pos = $(this).position(); var pos = $(this).position();
...@@ -36,4 +36,4 @@ ...@@ -36,4 +36,4 @@
<div id="marker"></div> <div id="marker"></div>
<p class="instructions">Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.</p> <p class="instructions">Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.</p>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
<script src="../../../src/css.js"></script> <script src="../../../src/css.js"></script>
<script src="../../../src/offset.js"></script> <script src="../../../src/offset.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function() { jQuery(function($) {
window.scrollTo(1000,1000); window.scrollTo(1000,1000);
$('#scroll-1')[0].scrollLeft = 5; $('#scroll-1')[0].scrollLeft = 5;
$('#scroll-1')[0].scrollTop = 5; $('#scroll-1')[0].scrollTop = 5;
...@@ -44,4 +44,4 @@ ...@@ -44,4 +44,4 @@
<div id="marker"></div> <div id="marker"></div>
<p class="instructions">Click the white box to move the marker to it.</p> <p class="instructions">Click the white box to move the marker to it.</p>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<script src="../../../src/css.js"></script> <script src="../../../src/css.js"></script>
<script src="../../../src/offset.js"></script> <script src="../../../src/offset.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function() { jQuery(function($) {
$('.static').click(function() { $('.static').click(function() {
$('#marker').css( $(this).offset() ); $('#marker').css( $(this).offset() );
var pos = $(this).position(); var pos = $(this).position();
...@@ -36,4 +36,4 @@ ...@@ -36,4 +36,4 @@
<div id="marker"></div> <div id="marker"></div>
<p class="instructions">Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.</p> <p class="instructions">Click the white box to move the marker to it. Clicking the box also changes the position to absolute (if not already) and sets the position according to the position method.</p>
</body> </body>
</html> </html>
\ No newline at end of file
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
<script src="../../../src/css.js"></script> <script src="../../../src/css.js"></script>
<script src="../../../src/offset.js"></script> <script src="../../../src/offset.js"></script>
<script type="text/javascript" charset="utf-8"> <script type="text/javascript" charset="utf-8">
$(function() { jQuery(function($) {
$('table, th, td').click(function() { $('table, th, td').click(function() {
$('#marker').css( $(this).offset() ); $('#marker').css( $(this).offset() );
return false; return false;
...@@ -48,4 +48,4 @@ ...@@ -48,4 +48,4 @@
<div id="marker"></div> <div id="marker"></div>
<p class="instructions">Click the white box to move the marker to it.</p> <p class="instructions">Click the white box to move the marker to it.</p>
</body> </body>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment