The jQuery ajax methods take callbacks which are run when the data is
recieved/loaded, so:
$(...).load(url,params,function(){
$('.notify',this).fadeOut('slow'); // '.notify',this, looks for .notify
elements inside the element being updated
});
Blair
On 1/17/07, Vaska <[EMAIL PROTECTED]> wrote:
Well, I was close...but still not close enough:
$(document).ready ( function() { $('.notify').fadeOut('slow') });
Works onload - for the obvious reasons.
But, I need this to work any time there is a something with class
'notify'. This is the hard part (I'm reading up on things now). I
also need to pause this, but I think I can throw a setTimeout in
there and all will be ok.
And yeah, it's working fine on a span.
;)
On 16 Jan 2007, at 18:13, James Thomas wrote:
>
> Use <div> instead of <span> - that worked for me when I had a similar
> problem.
>
>
> Vaska wrote:
>
>>
>> I'm trying to write my first jquery function using it's rules...it's
>> hard getting started.
>>
>> I want to write a function that is ready at all times for any div's
>> (or perhaps spans's instead) that when they appear they will fade
>> away about ten second later. I'll attach a class to the span called
>> 'notify'...like this...
>>
>> <span class='notify'>Updated</span>
>>
>> These are appearing via an ajax call already, so they don't appear
>> when the page originally loads...only after an ajax call has been
>> executed.
>>
>> The best I've been able to get so far...no, this doesn't work...I'm
>> hoping somebody can help me move forward with this (my head is
>> spinning here):
>>
>> $(document).ready
>> (
>> function ()
>> {
>> $('span.notify').fadeOut('slow')
>> }
>> );
>>
>> I don't care if it simply fades out the text or the entire span...or
>> perhaps even innerHTML's the text to an (there's another
>> idea)...
>>
>> Help! ;)
>>
>> _______________________________________________
>> jQuery mailing list
>> [email protected]
>> http://jquery.com/discuss/
>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/fadeOut-text-
> tf3021748.html#a8394482
> Sent from the JQuery mailing list archive at Nabble.com.
>
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/
>
>
>
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/