Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

JS event when header has finished initialisation

Home / Forums / Virtue Theme / JS event when header has finished initialisation

This topic is: Not Resolved
[Not Resolved]
Posted in: Virtue Theme
April 29, 2016 at 3:59 am

I noticed that the shrinked/sticky header often only gets initially a tiny (0.5s-2s) after $document.ready. See here for example:
(page does document.ready, sticky header comes a bit later).

I need to do some JavaScript just when the header has finished. Currently I just do a setTimeout(myStuff, 3000), but it’s not optimal. Is there an event that gets triggered when the sticky/shrinked headers is done? That is a way to listen do it like $('.certainHeaderElement').on('theHeaderHasFinished', function() {mystuff})?

  • The forum ‘Virtue Theme’ is closed to new topics and replies.