-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
32 lines (25 loc) · 1.15 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!doctype html>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script>
<script src="jquery-timemachine.min.js"></script>
<script>
jtm('1.2.6', function(jQuery, $) {
alert('This is executed in the callback of jQuery version '+this.fn.jquery);
});
jqTimemachine('1.3.2', function(jQuery, $) {
alert('This is executed in the callback of jQuery version '+jQuery.fn.jquery);
});
jqTimemachine('1.2.6', function(jq, $) {
alert('Another time '+jq.fn.jquery);
});
jtm('1.5.0', function(jQuery, $) {
alert('This is executed in the callback of jQuery version '+$.fn.jquery);
// Check the jquery in the global scope
alert('jQuery version in global scope, executed in timemachine callback: '+window.jQuery.fn.jquery);
});
jtm('12.0.1', function(jQuery, $) {
// following alert should not run, Check ur console
alert('current loaded version does not exist.');
});
if (typeof jQuery != 'undefined')
alert('jQuery version in global scope, executed in global scope: '+jQuery.fn.jquery);
</script>