refTagger Working On Page Load, But Breaks After Subsequent Ajax Rendering + Suggestion

Hi,
I'm able to use the provided code which works well when the page loads, but breaks after ajax renders.
I'm used to wrapping code in function, and placing them inside $(document).ready(function() {... or $(document).ajaxComplete(function() {... to execute certain code before and after ajax calls respectively. Any idea how this should work?
Is there any way to declare/instantiate the refTagger variable and encapsulate the code inside a function that can be better controlled?
Just a suggestion: I think a Classes to include: option would be great to specifically target the scripture references.
Thanks,
-Andrew
P.S. I figured out that the this code in the style tag leaves the original reference link intact:
.rtBibleRef {
color:inherit;
}
Comments
-
I just added this to my code to make it work:
$(document).ajaxComplete(function() {
refTagger.tag();
});0