Skip to content

Instantly share code, notes, and snippets.

@beardlessman
Created April 11, 2018 13:54
Show Gist options
  • Save beardlessman/80cf30a603ffe6a877ce244f24227e4e to your computer and use it in GitHub Desktop.
Save beardlessman/80cf30a603ffe6a877ce244f24227e4e to your computer and use it in GitHub Desktop.
$(document).ready(function() {
   $("#about").click(function() {
       $('#about > .lazyload').each(function() {
           // установка src для элемента img на основании data-src
           $(this).attr('src', $(this).attr('data-src'));
       });
   });
   $("#articles").click(function() {
       $('#articles > .lazyload').each(function() {
           // установка src для элемента img на основании data-src
           $(this).attr('src', $(this).attr('data-src'));
       });
   });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment