[jQuery] Re: 2nd Trigger for images hover function

2010-01-11 Thread Jordan
Perfect! Thanks so much!

On Jan 8, 4:15 pm, Šime Vidas sime.vi...@gmail.com wrote:
 How many DIVs of class tv do you have? One?

 And you want an other DIV to trigger the cross-fade on the tv DIV?

 If that is the case...

     $(document).ready(function () {
         $('div.tv, #theOtherDiv').hover(function () {
                 var div = $('div.tv  div');
                 if (div.is(':animated')) {
                         div.stop().fadeTo(500, 1);
                 } else {
                         div.fadeIn(250);
                 }
         }, function () {
                 var div = $('div.tv  div');
                 if (div.is(':animated')) {
                         div.stop().fadeTo(1000, 0);
                 } else {
                         div.fadeOut(1000);
                 }
         });

[jQuery] Re: 2nd Trigger for images hover function

2010-01-08 Thread Šime Vidas

How many DIVs of class tv do you have? One?

And you want an other DIV to trigger the cross-fade on the tv DIV?

If that is the case...

$(document).ready(function () {
$('div.tv, #theOtherDiv').hover(function () {
var div = $('div.tv  div');
if (div.is(':animated')) {
div.stop().fadeTo(500, 1);
} else {
div.fadeIn(250);
}
}, function () {
var div = $('div.tv  div');
if (div.is(':animated')) {
div.stop().fadeTo(1000, 0);
} else {
div.fadeOut(1000);
}
});