File tree Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Expand file tree Collapse file tree 1 file changed +28
-4
lines changed Original file line number Diff line number Diff line change 4
4
* https://github.com/marcj/css-element-queries/blob/master/LICENSE.
5
5
*/
6
6
;
7
- ( function ( ) {
7
+ ( function ( factory ) {
8
+ // Eastablish root object
9
+ var root = ( typeof self == 'object' && self . self == self && self ) ||
10
+ ( typeof global == 'object' && global . global == global && global ) ;
11
+
12
+ // Setup with dependency
13
+ if ( typeof define === 'function' && define . amd ) {
14
+ define ( [
15
+ 'jquery' ,
16
+ 'ResizeSensor' ,
17
+ 'exports'
18
+ ] , function ( jQuery , ResizeSensor , exports ) {
19
+ return factory ( root , exports , jQuery , ResizeSensor ) ;
20
+ } ) ;
21
+ } else {
22
+ root . ElementQueries = factory ( root ) ;
23
+ }
24
+ } ( function ( root , ElementQueries , jQuery , ResizeSensor ) {
25
+ var previousElementQueries = root . ElementQueries ;
8
26
/**
9
27
*
10
28
* @type {Function }
11
29
* @constructor
12
30
*/
13
- var ElementQueries = this . ElementQueries = function ( ) {
31
+ var ElementQueries = function ( ) {
14
32
15
33
this . withTracking = false ;
16
34
var elements = [ ] ;
338
356
window . attachEvent ( 'onload' , ElementQueries . init ) ;
339
357
}
340
358
domLoaded ( ElementQueries . init ) ;
341
-
342
- } ) ( ) ;
359
+
360
+ ElementQueries . noConflict = function ( ) {
361
+ root . ElementQueries = previousElementQueries ;
362
+ return this ;
363
+ } ;
364
+
365
+ return ElementQueries ;
366
+ } ) ) ;
You can’t perform that action at this time.
0 commit comments