Hey folks,
I had this issue in the past (which is now resolved however) but i’m interested in finding out exactly why the problem could have been occuring…
I had a basic show/hide script:
function InitThings()
{
var showThings = true;
var toggleLink = document.getElementById("things");
var toggleElement = document.getElementById("footerInfo");
//initial hide
toggleElement.style.display = "none";
toggleLink.click = function()
{
if(showThings && toggleElement != null)
{
toggleElement.style.display = "block";
window.location = "#things";
showThings = false;
}
else
{
toggleElement.style.display = "none";
showThings = true;
}
}
}
The problem was when we placed the files up on to our staging server the click event wouldn’t fire for the toggleElement…BUT this was only happening on the staging environment NOT locally (worked fine while testing)…
What we did to fix the issue was to change the eventName to “onclick” instead of “click”.
Any ideas?