Skip to content
Load images of your webpage only after the page is already loaded
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
README.md
afterparty.js
bower.json
example.html
yoms.png

README.md

afterparty.js

Load images of your webpage only after the page is loaded. It's easy to use:

  • source afterparty.js and
  • use the "after-src" <img> attribute instead of the "src".

install

It's recommended to use Bower for every web developer. If you also do, you can easily install afterparty.js with the following:

$ bower install afterparty.js

example.html

<html>
<head>
    <title>Hi, afterparty!</title>
</head>
<body>
    <center>
        <a href="https://yoms.org/">
            <img after-src="yoms.png" alt="" width="162" height="162" style="padding-top: 100px;">
        </a>
    </center>
    <script src="https://code.jquery.com/jquery-2.1.1.min.js" type="text/javascript"></script>
    <script src="afterparty.js" type="text/javascript"></script>
</body>
</html>
Something went wrong with that request. Please try again.