Custom script - how to modify activities after they load?
Is the best way to do this with a mutation observer on $('div.activity-list-container') and check for the presence of children that match $('div.activity-item')? Or is there another, existing event I could bind an additional function to? My hesitation at taking my own suggestion above is just that I already have a lot of mutation observers on any given page, and I am also unsure of what this might do to performance on tickets that do not have activities and therefore do not stop the observer from observing.
Here are two examples of my actual goal, which only works (long) after the page has loaded:
$('div.activity-item-header[data-activity-id^="RA"]').parent().addClass('reviewActivity'); $('div.activity-item-header[data-activity-id^="PA"]').parent().addClass('parallelActivity');JQuery just doesn't find those elements if you run this within boundReady.
Confirmation and better suggestions are both welcome!