demo: http://jsfiddle.net/3p87Z/

PHP Code: 
<html xmlns="http://www.w3.org/1999/xhtml">
  <
head>
    <
title>Change Text</title>
    <
script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
        // this shit done by mRAza
        // setting current element
        var current = 0;
        // starting interval for 2 seconds
        setInterval(changeText, 2000);
        
        function changeText(){
        // links array with text to tdisplay
        var links =  [      
                            {"text" : "google site",  "link" : 'http://google.com' },
                            {"text" : "yahoo web",  "link" : 'http://yahoo.com'},
                            {"text" : "KWWHunction ftw",  "link" : 'http://besthostingforums.com'}
                    ]
                // lets check if total arrays are reached so we start from first element    
                if(links.length == current){
                    current = 0;
                }
                // change the text
                setTimeout(function() {
                    $("#demo").text(links[current]['text']).attr('href', links[current]['link']);
                    current++;
                 }, 1900);
        }
    });
    </script>
  </head>
 <body>
    <div><a  id="demo" href="http://google.com">google</a></div>
 </body>
 
 </html> 
mRAza Reviewed by mRAza on . How to make an Auto changing text with link via html?? How to make an Auto changing text with link via html?? I need to know what code i must use to make a TEXT with links changing by timer or even by page reload so each time the user move from page to page the text changes. the text will be with links to another pages on same site or even to outside from it it looks like this: free games ( as first text for exa ) hot offers ( as second text for exa) ... and so on Rating: 5