HOW THE HECK DO I FADE THIS IN LOL?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
scarface222
Forum Contributor
Posts: 354
Joined: Thu Mar 26, 2009 8:16 pm

HOW THE HECK DO I FADE THIS IN LOL?

Post by scarface222 »

Hey I know not many people check this forum subject out but I am desperate. I have a jquery post form here that simply updates information on a page on a timer, it works except I cannot get the #test123 content to fade in. What I am trying to do is have individual comments update individually by fading in but I cant figure out how to without running two update functions connected to two separate mysql queries which seems inefficient. Do I need JSON? One of them updates the entries for the last 10 seconds and the other one updates all of them so the previous ones do not disappear on the next update of the last 10 second entries. Does anyone have any ideas on this? I would really appreciate it.
that is one of the functions below,it updates its entries and then the updateall() function is linked to a mysql query to update all. I am just so confused.

Code: Select all

function updateEntries(){
            //just for the fade effect
            var scrollPosition = $(window).scrollTop();    //+ save scroll position
            
           var name = inputUser.attr("value");
 
            var topic_id = inputTopic_id.attr("value");
            $.ajax({
               type: "POST", url: "process.php", data: "action=updateEntries&topic_id=" + topic_id + "&name=" + name,
               complete: function(data){
                 $("#test123").html(data.responseText); //this is the problem
                
                   $(window).scrollTop(scrollPosition);    //+ scroll to previously saved position
                     updateall(); 
               }
          });
       }
cpetercarter
Forum Contributor
Posts: 474
Joined: Sat Jul 25, 2009 2:00 am

Re: HOW THE HECK DO I FADE THIS IN LOL?

Post by cpetercarter »

Try this:

Code: Select all

$('#test123').hide();
$("#test123").html(data.responseText);
$('#test123').show('slow');
 
Post Reply