I have a comprehension question for an selector call

I have a comprehension question for an selector call

Hello everybody,

i have a comprehension question to use the nice selector engine from jQuery.

Here my code:
   $('div.title')
   .click(function(){
      var t=$(this).next('div.description');
      $('div.description:visible').not(t).slideUp();
      t.slideToggle();
   })
   .hover(function(){
      console.log($(this+':has(img)'));
   },function() {
   });

In the mouseover/enter function, i want to check if the div has an image in there, but this call doesn't work.

If i call this: console.log($('div.title:has(img)')); i became correctly an array with all DIVs they include an image.

How can i use $(this) for an selector call?



cheers
cine
    • Topic Participants

    • spam