Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Okay I think better understand what you're trying to do here... Your event handlers should look something like this :</strong></p> <pre><code>$(".itemInterest img").mouseout(function() { $(this).attr("src", "images/"+array2[imgno2]); $(this).parent().parent().next().children('img').attr("src", "images/"+array[imgno]); }) $(".itemInterest img").mouseenter(function() { $(this).attr("src", "images/ic_forbid_on.png"); $(this).parent().parent().next().children('img').attr("src", "images/ic_evaluation_none_m.png"); }) </code></pre> <p>If you want to apply the logic in the event handler, to only certain elements sharing a class, you need to make sure you selectors are selecting the correct elements.</p> <p>Now if you want to execute that logic against ALL elements matching a selector, you need to make sure you're iterating over the collection returned by your selectors, something like :</p> <pre><code> $(".itemInterest img").mouseenter(function() { $(".itemInterest img").each(function(index, element) { $(this).attr("src", "images/ic_forbid_on.png"); }); $(".itemEvaluation &gt; ul").each(function(index, element) { $(this).children('.lili').each(function(index, element) { $(this).children('img').each(function(index, element) { $(this).attr("src", "images/ic_evaluation_none_m.png"); }); }); }); }) $(".itemInterest img").mouseout(function() { $(".itemInterest img").each(function(index, element) { $(this).attr("src", "images/"+array2[imgno2]); }); $(".itemEvaluation &gt; ul").each(function(index, element) { $(this).children('.lili').each(function(index, element) { $(this).children('img').each(function(index, element) { $(this).attr("src", "images/"+array[imgno]); }); }); }); }) </code></pre> <p>Sorry for all the edits but hopefully this clarifies things for you.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload