WordPress.org

Ready to get started?Download WordPress

Forums

Hack to Preload Next Category Image (6 posts)

  1. stew278
    Member
    Posted 8 years ago #

    Is anyone aware of a hack or plugin that would allow me to include a preload the next image in a category function in the body?

  2. stew278
    Member
    Posted 8 years ago #

    Anyone help point in right direction?

  3. moshu
    Member
    Posted 8 years ago #

    No, and don't bump after an hour or two. Be patient!

  4. VaamYob
    Member
    Posted 8 years ago #

    I don't know of a plugin, but the general hack is to do something like:


    <script type="text/javascript">
    var preLoaded = document.createElement('img');
    preLoaded.src = '/whatDoYouMeanByNEXT.jpg';
    </script>

  5. stew278
    Member
    Posted 8 years ago #

    Thanks VaamYob; question though ... how do I set the preLoaded.src to equal the output of the next entry in the head? I'm not clear on the actual tag to use, considering that you have to have next_post in the Loop. Assuming you've placed this script in the head I guess.

  6. stew278
    Member
    Posted 8 years ago #

    what would be the right wordpress tag to use on this then?

Topic Closed

This topic has been closed to new replies.

About this Topic