Мне необходимо, чтобы картинки, которые вставлены как загружались только для
media="(min-width: 1000px)", т.к. они очень тяжелые и в мобильной версии не нужны. Как их вставить в конец body через innerHtml или appendTo ?
<script>
(function($){
$(window).on("load",function(){
if($(window).width() < 767)
{
$("<img class="background-clipart background-clipart-1" src="img/background/1.png" height="600" width="639" alt="">
<img class="background-clipart background-clipart-2" src="img/background/2.png" height="600" width="641" alt="">
<img class="background-clipart background-clipart-3" src="img/background/3.png" height="600" width="610" alt="">
<img class="background-clipart background-clipart-4" src="img/background/4.png" height="600" width="649" alt="">
<img class="background-clipart background-clipart-5" src="img/background/5.png" height="600" width="598" alt="">
<img class="background-clipart background-clipart-6" src="img/background/6.png" height="600" width="648" alt="">
<img class="background-clipart background-clipart-7" src="img/background/7.png" height="600" width="786" alt="">
<img class="background-clipart background-clipart-8" src="img/background/8.png" height="600" width="597" alt="">
<img class="background-clipart background-clipart-9" src="img/background/9.png" height="600" width="608" alt="">
<img class="background-clipart background-clipart-10" src="img/background/10.png" height="600" width="600" alt="">
<img class="background-clipart background-clipart-11" src="img/background/11.png" height="397" width="800" alt="">
<img class="background-clipart background-clipart-12" src="img/background/12.png" height="600" width="497" alt="">
<img class="background-clipart background-clipart-13" src="img/background/13.png" height="488" width="800" alt="">
<img class="background-clipart background-clipart-14" src="img/background/14.png" height="600" width="594" alt="">
<img class="background-clipart background-clipart-15" src="img/background/15.png" height="600" width="614" alt="">
<img class="background-clipart background-clipart-16" src="img/background/16.png" height="600" width="497" alt="">
<img class="background-clipart background-clipart-17" src="img/background/17.png" height="600" width="629" alt="">").appendTo($(".auto-layout"));
};
});
})
</script>