TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Javascript, AJAX, E4X (http://www.talkphp.com/javascript-ajax-e4x/)
-   -   AJAX ticker in jQuery (http://www.talkphp.com/javascript-ajax-e4x/3933-ajax-ticker-jquery.html)

Orc 02-03-2009 08:25 AM

AJAX ticker in jQuery
 
I have an ajax ticker going in jquery, and I want to know how you prevent it from repeating the same data.

Salathe 02-03-2009 10:59 AM

I'd just ask it nicely. If you really want us to help, don't just provide a one-sentence post with no useful information.

Orc 02-04-2009 01:50 AM

I'll show you my code:
Code:

function ticker_req(element) {
       
       
        $.getJSON('ajax.php?tick=blogs',
        function(data){ticker_com(element,data);});
       
}

function ticker_com(element, data) {

        $.each(data, function() { $(element).append(data.blogtitle); });
       
        setTimeout(function(){ticker_req(element);},1000);
}


That's really all I have so far. ;P The power of jQuery. <3

Orc 02-09-2009 05:31 AM

Bump. (chars)


All times are GMT. The time now is 10:08 AM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0