[jQuery] Access original element in ajax callback function

2008-02-05 Thread wswilson
Is there any other way to do it than this? Could I somehow pass the original element to the callback function? $('.abc a').click(function() { var tmp = $(this); $.get('/abc', {id: '1'}, function(data) { tmp.next().html(data); }); return false; });

[jQuery] Re: mouseout seems to occur while still in div

2007-06-14 Thread wswilson
; wrote: > (untested) You need to do: > > $('div.a').mouseout(function(e) { > if (e.target == this) { > $(this).children('span.b').hide(); > } > > }); > > Cheers, > -js > > On 6/13/07, wswilson <[EMAIL PROTECTED]> wrote: &g

[jQuery] Re: mouseout seems to occur while still in div

2007-06-14 Thread wswilson
); > } > > }); > > Cheers, > -js > > On 6/13/07, wswilson <[EMAIL PROTECTED]> wrote: > > > > > Here is my code: > > > > > > > > > > > > $(function() { > >$('div.a span.b').hide(); >

[jQuery] mouseout seems to occur while still in div

2007-06-13 Thread wswilson
Here is my code: $(function() { $('div.a span.b').hide(); $('div.a h1').mouseover(function() {$(this).next('span.b').show();}); $('div.a').mouseout(function() {$(this).children('span.b').hide();}); }); .a h1, span.b { display: inline