• Resolved Revived

    (@revived)


    Wondering if you believe it would be advantageous to have a customizable visual that informs users the auction listing are loading? Currently, the area in which the listings are to load is collapsed and it takes several seconds before the listings are displayed. Thoughts?

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Joe

    (@morehawes)

    Hi Revived,

    This is possible using JavaScript. I have put together a simple example of this here (please view source to see the code):

    https://www.auctionnudge.com/temp/loading-example.html

    The relevant JavaScript is:

    
    <script type="text/javascript">
    var an_container = document.getElementById('auction-nudge-items');
    an_container.innerHTML = '<div id="loading">Loading content here...</div>';
    </script>
    

    Auction Nudge should load very quickly on your site, but may be slowed down by having to wait for other site assets to load first. I would recommend doing some page load optimisations and also enabling the Auction Nudge caching option (Settings > Auction Nudge > Use WordPress Cache?) to speed things up.

    I hope this helps.

    Joe

    Thread Starter Revived

    (@revived)

    Should this js go in the head, after the opening body, or before the closing body?

    Plugin Author Joe

    (@morehawes)

    I believe it shouldn’t make a difference, as long as it goes before the Auction Nudge JavaScript which is just before the closing </body> tag.

    Joe

    Thread Starter Revived

    (@revived)

    I have it placed before the closing body and it seems to be working fine.

    All I’m using is a loading animation (gif). It seems to be vertically aligning itself to the middle of the total height of the to be displayed listings. I realize this question is probably beyond the scope of your typical support but could you suggest a (I assume css) fix to force that loading image to the top of the div? I tried vertical-align: top but that’s not moving it up.

    Plugin Author Joe

    (@morehawes)

    On second thoughts, it’s probably best to place it somewhere after the <div id="auction-nudge-items" class="auction-nudge"></div> but before the Auction Nudge <script>.

    The code I provided is just a quick and dirty example. I hope this helps though.

    Joe

    Thread Starter Revived

    (@revived)

    Disregard that css question. The image had a height of 800, that’s why! lol

    Thanks!

    Thread Starter Revived

    (@revived)

    I have it right after the function auction_nudge_loaded() script and before the closing body (with nothing else after) and it seems to be working fine.

    Plugin Author Joe

    (@morehawes)

    I have it right after the function auction_nudge_loaded() script and before the closing body (with nothing else after) and it seems to be working fine.

    Great, I’m glad that worked.

    Joe

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Auction loading visual’ is closed to new replies.