<frame> not displaying page |
<frame> not displaying page |
cputom |
May 6 2012, 04:53 AM
Post
#1
|
Group: Members Posts: 2 Joined: 6-May 12 Member No.: 17,061 |
OK i'm trying to make an image scroller using jquery work within a frame. I put all the code in banner.html it works fine, but whenever i try to use it within <frame src="banner.html"/> it doesn't load anything into the frame at all.
layout.css slideshow { position:relative; height:400px; } slideshow IMG { position:absolute; top:0; left:0; z-index:8; opacity:0.0; } slideshow IMG.active { z-index:10; opacity:1.0; } slideshow IMG.last-active { z-index:9; } banner.html <head> <link href="layout.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" src="jquery-1.2.6.min.js"></script> <script type="text/javascript"> function slideSwitch() { var $active = $('#slideshow IMG.active'); if ( $active.length == 0 ) $active = $('#slideshow IMG:last'); var $next = $active.next().length ? $active.next() : $('#slideshow IMG:first'); $active.addClass('last-active'); $next.css({opacity: 0.0}) .addClass('active') .animate({opacity: 1.0}, 1000, function() { $active.removeClass('active last-active');});} $(function() { setInterval( "slideSwitch()", 5000 ); }); </script> <div id="slideshow"> <img src="images/banner1.jpg" alt="Contact us" class="active" /> <img src="images/banner2.jpg" alt="Services" /> </div> </head> <body> </body> |
cputom |
May 6 2012, 05:10 AM
Post
#2
|
Group: Members Posts: 2 Joined: 6-May 12 Member No.: 17,061 |
nvm i saved the javascript of banner.html into its own .js file and just linked every page to it ty anyways sorry for waste of time.
|
Lo-Fi Version | Time is now: 25th April 2024 - 12:31 PM |