Jquery refresh div script help. |
Jquery refresh div script help. |
sanoj96 |
Jan 29 2015, 05:10 PM
Post
#1
|
Advanced Member Group: Members Posts: 118 Joined: 18-September 12 Member No.: 17,803 |
Hello, i am kinda new to Jquary, and are trying to make a simple thing that refresh 6 divs on my website with 9 or 10 sec delay.
Well yea i have googled around, and dident find anything that would help me. i have 3 files one for index (where all the magic shuld happen) one that gets loaded when its time fore refreshin the divs and a css file for styling. i will add the files so you guys can see how i am doing and/or give me advaice for what i shuld do. I want it to fade fast out and fast in, simple. here is the index file CODE <html> <head> <title>Saker løst denne uken.</title> <link rel="stylesheet" type="text/css" href="css/style.css"> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(document).ready(function() { $("#section1, #section2, #section3, #section4, #section5, #section6").fadeOut("fast").load("load.html").fadein("fast"); }, 9000); $.ajaxSetup({ cache: false }); }); </script> </head> <body> <div class="wrap"> <div id="section1"> <img src="http://nn.nn.nn.nn/test.pl?week=1&w=450&h=450" /> </div> <div id="section2"> <img src="http://nn.nn.nn.nn/test.pl?week=1&w=450&h=450" /> </div> <div id="section3"> <img src="http://nn.nn.nn.nn/test.pl?week=1&w=450&h=450" /> </div> <div id="section4"> <img src="http://nn.nn.nn.nn/test.pl?week=1&w=450&h=450" /> </div> <div id="section5"> <img src="http://nn.nn.nn.nn/test.pl?week=1&w=450&h=450" /> </div> <div id="section6"> <img src="http://nn.nn.nn.nn/test.pl?week=1&w=450&h=450" /> </div> </div> </body> </html> here is the load file CODE <html> <head> <title>Saker løst denne uken.</title> <link rel="stylesheet" type="text/css" href="css/style.css"> </head> <body> <div class="wrap"> <div id="section1"> <img src="http://www.gametracker.com/server_info/nn.nn.nn.nn/b_560_95_1.png" /> </div> <div id="section2"> <img src="http://www.gametracker.com/server_info/nn.nn.nn.nn/b_560_95_1.png" /> </div> <div id="section3"> <img src="http://nn.nn.nn.nn/test.pl?week=1&w=450&h=450" /> </div> <div id="section4"> <img src="http://nn.nn.nn.nn/test.pl?week=1&w=450&h=450" /> </div> <div id="section5"> <img src="http://nn.nn.nn.nn/test.pl?week=1&w=450&h=450" /> </div> <div id="section6"> <img src="http://nn.nn.nn.nn/test.pl?week=1&w=450&h=450" /> </div> </div> </body> </html> i dont think its needed to post the css file. but if its needed just comment belove. Thanks |
Lo-Fi Version | Time is now: 24th April 2024 - 10:37 AM |