The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Jquery refresh div script help.
sanoj96
post 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 smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 24th April 2024 - 10:37 AM