diff options
| author | Max | 2018-01-29 21:08:14 +0100 |
|---|---|---|
| committer | Max | 2018-01-29 21:08:14 +0100 |
| commit | bee1f5733ea92f3219ed64ac53f1fd992a5cf31a (patch) | |
| tree | 1d5bc3c74cca749eb6e41158adbed9be59e98eb3 | |
| parent | 63dd86c0da02a55c99ed1fd6b54abceacce967b7 (diff) | |
| download | gospeladlershof.de-bee1f5733ea92f3219ed64ac53f1fd992a5cf31a.tar.gz | |
Konditionales Lazyloading.
| -rw-r--r-- | gospeladlershof.de/static/js/gospelchor.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/gospeladlershof.de/static/js/gospelchor.js b/gospeladlershof.de/static/js/gospelchor.js index 70c7631..4db2b70 100644 --- a/gospeladlershof.de/static/js/gospelchor.js +++ b/gospeladlershof.de/static/js/gospelchor.js @@ -121,8 +121,14 @@ $(window).load(function(){ } }); $(document).ready(function(){ - lzld(document.getElementById('img-chor-alt')); - lzld(document.getElementById('osm')); + chor_tmp = document.getElementById('img-chor-alt'); + if ( null != chor_tmp ) { + lzld(chor_tmp); + } + chor_tmp = document.getElementById('osm'); + if ( null != chor_tmp ) { + lzld(chor_tmp); + } var thumbs = document.getElementsByClassName("chor-thumbnail"); for( i = 0; i < thumbs.length; i++) { |
