Page 1 of 1

HOW THE HECK DO I FADE THIS IN LOL?

Posted: Thu Mar 18, 2010 2:18 pm
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(); 
               }
          });
       }

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

Posted: Sun Apr 04, 2010 4:38 pm
by cpetercarter
Try this:

Code: Select all

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