Hey guys, thanks in advance for the support.
Recently I choose GSAP ScrollTo Plugin to solve a situation on my site.
Basically I coded a window.onload function, that evaluates the url hashtag. The format of the hashtag is "#whatever_Details".
So, I take this hashtag and using the substr() method I isolate the part of the hashtag containing the name of the section ("whatever")
and concatenating "_article". The real id of the elements to target is this, they end with "_article".
I pass the "whatever_article" to the ScrollTo plugin
This is the current script:
<script>
document.body.className = "stop-scrolling";
window.onload = function(){
document.body.className = "";
var hashText, verticalOffset = 70;
if(location.hash != ""){
hashText = location.hash.substr(1, (location.hash.length - 9));
TweenMax.to(window, 0, {scrollTo:document.getElementById(hashText + "_article").offsetTop - verticalOffset});
}
}
</script>
However, It doesn't work. And in Chrome I get a weird error:
TweenMax.min.js:17 Uncaught SecurityError: Blocked a frame with origin ""https://www.google.com". The frame requesting access has a protocol of "http", the frame being accessed has a protocol of "https". Protocols must match.
This error is fired infinitely.
On Firefox I get a recurrent error, but with a different description:
Error: Permission denied to access property "_gsTweenID"
This is the webpage with the problem: http://fabianmiranda.com/beta/about.shtml
You can put "#experience_Details" at the end of the url, to test what i am describing.
The weird thing is that this code was actually working already on another section: http://fabianmiranda.com/beta/portfolio.shtml#shirleygatgens_Details
http://fabianmiranda.com/beta/portfolio.shtml#zambuni_Details
Do you guys have any idea of what could be causing this problem?
Thanks!