I would like to make a href that onclick activates a JS function that fades in and fades out 2 objects from another frameset, this is what I have so far(these codes have been taken from different places around the web and might be far off, I thank you if you can be kind enough to help me) -
FRAMESET A:
<script type="text/javascript">
function LogoToNews() {
var LogoBot = window.frames["TopLogo"].document.getElementById("LogoBot");
var LogoBotNews = window.frames["TopLogo"].document.getElementById("LogoBot_News");
LogoBot.fadeTo("slow", 0)
LogoBotNews.fadeTo("slow", 1.0)
}
</script>
<a href="#" class="Normal" onclick="LogoToNews()">LinkHere</a>
FRAMESET B:
<LogoBot><img id="LogoBot"/></LogoBot>
<LogoBot_News><img id="LogoBot_News/></LogoBot_News>
My goal is the fade out LogoBot and fade in LogoBot_News using the href from Framset A.
Raw DOM elements don't have a
fadeTo()
function.If you want to use jQuery, you'll need to create a jQuery object:
Or