Page 1 of 1 (1 items)
This post has 0 Replies | 0 Followers

Posts 1
Elgordo | Forum Activity | Posted: Thu, Mar 20 2014 4:05 AM

Hi, firstly reftagger is great. Thanks for providing such an awesome free tool!  : )

I was hoping someone could help with this wee prob... My website is just a collection of html files with a single stylesheet file. If I put the reftagger code at the bottom of each page is works fine. Nice. I could do this... but, I'd rather just specify the code once in one javascript file that all the pages reference. So at it's most basic I would like to have a page like:

<html>
<head>
<script src="/js/sitescripts.js" type="text/javascript" ></script>
</head>

<body>

John 3:16 is the truth!

<script>
setReftagger();
</script>

</body>
</html>

And then in the sitescript.js file have:

function setReftagger(){
var refTagger = {
settings: {
bibleVersion: "ESV"
}
};
(function(d, t) {
var g = d.createElement(t), s = d.getElementsByTagName(t)[0];
g.src = "//api.reftagger.com/v2/RefTagger.js";
s.parentNode.insertBefore(g, s);
}(document, "script"));
}

But I can't get this to work. I can step through the code and I know it is stepping into the js file and my setReftagger function... but alas... no hyperlinks on the page. 

Any thoughts? Could be a basic mistake or misunderstanding on my part but in reading the docs I thought we should be able to just put the code in one place and reference it?

Thanks for any help : )

Page 1 of 1 (1 items) | RSS