diff --git a/README.md b/README.md index 12a28c6..6f762bc 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ $('#container').imagesLoaded( { ); ``` -`.imagesLoaded()` returns a [jQuery Deferred object](http://api.jquery.com/category/deferred-object/). This allows you to use `.always()`, `.done()`, `.fail()` and `.progress()`. +`.imagesLoaded()` returns a [jQuery Deferred object](https://api.jquery.com/category/deferred-object/). This allows you to use `.always()`, `.done()`, `.fail()` and `.progress()`. ``` js $('#container').imagesLoaded() @@ -126,7 +126,7 @@ imagesLoaded( '#container', { background: true }, function() { }); ``` -[See jQuery demo](http://codepen.io/desandro/pen/pjVMPB) or [vanilla JS demo](http://codepen.io/desandro/pen/avKooW) on CodePen. +[See jQuery demo](https://codepen.io/desandro/pen/pjVMPB) or [vanilla JS demo](https://codepen.io/desandro/pen/avKooW) on CodePen. Set to a selector string like `{ background: '.item' }` to detect when the background images of child elements have loaded. @@ -142,7 +142,7 @@ imagesLoaded( '#container', { background: '.item' }, function() { }); ``` -[See jQuery demo](http://codepen.io/desandro/pen/avKoZL) or [vanilla JS demo](http://codepen.io/desandro/pen/vNrBGz) on CodePen. +[See jQuery demo](https://codepen.io/desandro/pen/avKoZL) or [vanilla JS demo](https://codepen.io/desandro/pen/vNrBGz) on CodePen. ## Events @@ -278,7 +278,7 @@ webpack main.js bundle.js ## Browserify -imagesLoaded works with [Browserify](http://browserify.org/). +imagesLoaded works with [Browserify](https://browserify.org/). ``` bash npm install imagesloaded --save @@ -322,4 +322,4 @@ nvm use ## MIT License -imagesLoaded is released under the [MIT License](http://desandro.mit-license.org/). Have at it. +imagesLoaded is released under the [MIT License](https://desandro.mit-license.org/). Have at it. diff --git a/contributing.md b/contributing.md index acac280..704eb69 100644 --- a/contributing.md +++ b/contributing.md @@ -2,19 +2,19 @@ ### Reduced test case required -All bug reports and problem issues require a [**reduced test case**](http://css-tricks.com/reduced-test-cases/). +All bug reports and problem issues require a [**reduced test case**](https://css-tricks.com/reduced-test-cases/). + A reduced test case clearly demonstrates the bug or issue. + It contains the bare minimum HTML, CSS, and JavaScript required to demonstrate the bug. + A link to your production site is **not** a reduced test case. -Create a test case by forking a [CodePen demos](http://codepen.io/desandro/pens/tags/?selected_tag=imagesloaded-docs). +Create a test case by forking a [CodePen demos](https://codepen.io/desandro/pens/tags/?selected_tag=imagesloaded-docs). -+ [progress with jQuery](http://codepen.io/desandro/pen/bIFyl) -+ [progress with vanilla JS](http://codepen.io/desandro/pen/hlzaw) -+ [`{ background: true }` with jQuery](http://codepen.io/desandro/pen/pjVMPB) -+ [`{ background: true }` with vanilla JS](http://codepen.io/desandro/pen/avKooW) -+ [`{ background: '.selector' }` with jQuery](http://codepen.io/desandro/pen/avKoZL) -+ [`{ background: '.selector' }` with vanilla JS](http://codepen.io/desandro/pen/vNrBGz) ++ [progress with jQuery](https://codepen.io/desandro/pen/bIFyl) ++ [progress with vanilla JS](https://codepen.io/desandro/pen/hlzaw) ++ [`{ background: true }` with jQuery](https://codepen.io/desandro/pen/pjVMPB) ++ [`{ background: true }` with vanilla JS](https://codepen.io/desandro/pen/avKooW) ++ [`{ background: '.selector' }` with jQuery](https://codepen.io/desandro/pen/avKoZL) ++ [`{ background: '.selector' }` with vanilla JS](https://codepen.io/desandro/pen/vNrBGz) Providing a reduced test case is the best way to get your issue addressed. They help you point out the problem. They help me verify and debug the problem. They help others understand the problem. Without a reduced test case, your issue may be closed. diff --git a/imagesloaded.js b/imagesloaded.js index 13fea92..044710b 100644 --- a/imagesloaded.js +++ b/imagesloaded.js @@ -315,9 +315,8 @@ Background.prototype.confirm = function( isLoaded, message ) { ImagesLoaded.makeJQueryPlugin = function( jQuery ) { jQuery = jQuery || window.jQuery; - if ( !jQuery ) { - return; - } + if ( !jQuery ) return; + // set local variable $ = jQuery; // $().imagesLoaded() diff --git a/sandbox/background/css/background.css b/sandbox/background/css/background.css index 509966a..4a58bb1 100644 --- a/sandbox/background/css/background.css +++ b/sandbox/background/css/background.css @@ -7,7 +7,7 @@ } .orange-tree { - background: url('http://i.imgur.com/bwy74ok.jpg'); + background: url('https://i.imgur.com/bwy74ok.jpg'); background-size: cover; } @@ -18,9 +18,9 @@ .multi1 { background: - url("http://i.imgur.com/ZAVN3.png"), - url('http://i.imgur.com/6UdOxeB.png') bottom right, - url(http://i.imgur.com/LkmcILl.jpg); + url("https://i.imgur.com/ZAVN3.png"), + url('https://i.imgur.com/6UdOxeB.png') bottom right, + url(https://i.imgur.com/LkmcILl.jpg); background-size: cover; } diff --git a/sandbox/progress/index.html b/sandbox/progress/index.html index b244b4a..7533ad7 100644 --- a/sandbox/progress/index.html +++ b/sandbox/progress/index.html @@ -33,11 +33,11 @@ li.is-loading { background-color: black; - background-image: url('http://desandro.github.io/imagesloaded/assets/loading.gif'); + background-image: url('https://desandro.github.io/imagesloaded/assets/loading.gif'); } li.is-broken { - background-image: url('http://desandro.github.io/imagesloaded/assets/broken.png'); + background-image: url('https://desandro.github.io/imagesloaded/assets/broken.png'); background-color: #be3730; width: 120px; } diff --git a/test/css/tests.css b/test/css/tests.css index dc3466b..1a470fa 100644 --- a/test/css/tests.css +++ b/test/css/tests.css @@ -24,7 +24,7 @@ img { } .bg-box.tulip { - background: url('http://i.imgur.com/9xYjgCk.jpg'); + background: url('https://i.imgur.com/9xYjgCk.jpg'); background-size: cover; } @@ -35,8 +35,8 @@ img { .bg-box.multi { background: - url("http://i.imgur.com/ZAVN3.png"), - url('http://i.imgur.com/6UdOxeB.png') bottom right, + url("https://i.imgur.com/ZAVN3.png"), + url('https://i.imgur.com/6UdOxeB.png') bottom right, url(https://picsum.photos/601/401/?random); background-size: cover; } @@ -46,6 +46,6 @@ img { } .bg-box.gulls { - background-image: url('http://i.imgur.com/qKhkOKC.jpg'); + background-image: url('https://i.imgur.com/qKhkOKC.jpg'); background-size: cover; } diff --git a/test/index.html b/test/index.html index f009187..dc91401 100644 --- a/test/index.html +++ b/test/index.html @@ -38,14 +38,14 @@