Hook to load JS after plugin shortcode loaded
-
Hi
I have a google calendar showing, However I am trying to do something with JQuery for IF LOCATION CONTAINS text
The idea is that if the location is OFFICE then I will add a class or css to li class=”event” to be something like li class=”event red” and then the background to be red for any events which have office as the location.
However, This is hard to do currently as my Jquery loads before the shortcode. Is there any way to hook in after the shortcode?
or some JS that can tell when the shortcode has run/calendar loaded?
A quick example$(‘.location’).each(function(){
debugger;
if ($(‘.location:contains(“office”)’).length > 0) {
$(this).addClass(“thisClass”); //add a class to location for now, will use jQuery to find the parent .event once this works
alert(“done”);
}Thanks
- The topic ‘Hook to load JS after plugin shortcode loaded’ is closed to new replies.