Developers Diary

jQuery FIND

When trying to traverse downward in the DOM (this), utilize the FIND. I knew I was close, but I wasn’t sure how to say “find it only in THIS element only”, not all elements with this name.

jQuery(‘.call’).hover(

function(){ jQuery(this).find(“span.calltitle”).addClass(‘calltitlehover’);
},

//jQuery(“span.calltitle:first”).addClass(‘calltitlehover’) }, <!– WHAT I WAS TRYING TO DO, TARGETS ALL ELEMENTS ACROSS THE BOARD –>
function(){ jQuery(this).find(“span.calltitle”).removeClass(‘calltitlehover’) }
)