I think this is a purely technical question, even though I speak of using wordpress in this case and specific plugin and shortcode.
I use in my WordPress SmoothState.js. Everything works fine, except for two things:
1 – “Visualizer” or “Inline Google Spreadsheet Viewer” plugin for wordpress that use Google Charts. I can not find a function to call on the “callback”.
2 – same thing when in use MediaElement WordPress for native audio player with playlist with native shortcode and shortcode too. Appear on the first page, but then I do not know what to call on the callback to redisplay the players.
How to solve?
Maybe I can post something more technical, but if I had known where to look for the function to be called I would not have posted this question here.
I see that you’re using the
isFired
control for jQuery as explained in the blog post SmoothState.js & WordPress (h/t: this Github issue).In the comments of that post, the author says:
What I did to make your #2 work is to enqueue MediaElement when I’m enqueuing SmoothState:
WP only enqueues it when there’s a media shortcode on the page. If we start from another page without it, the script is not enqueued when SS loads a page that contains the media element.
A calendar plugin of mine had your same issue #1, beside enqueueing the scripts on my SS, I had to start up the main function (declared as global) on the callback, see below. Observations:
functions.php
won’t cut the deal.FullCalendar plugin (simplified):
SmoothState plugin (simplified):