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

Page 1 of 1 (2 items)
This post has 1 Reply | 1 Follower

Posts 2
Andrew Butt | Forum Activity | Posted: Tue, Jul 18 2017 5:01 PM

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;
}

Posts 2
Andrew Butt | Forum Activity | Replied: Wed, Jul 19 2017 12:30 AM

I just added this to my code to make it work:

$(document).ajaxComplete(function() {
    refTagger.tag();
});

Page 1 of 1 (2 items) | RSS