I am unsure which elements are being targeted within my .on
$('.levelFour').on('mouseover','> li',function(m){
I wonder, is there a way to display which elements are being targeted?
I am unsure which elements are being targeted within my .on
$('.levelFour').on('mouseover','> li',function(m){
I wonder, is there a way to display which elements are being targeted?
Inside an event handler, this
will be bound to the element that the event fired on. To create a jQuery object from it, use $(this)
.
You can run the following command in your browser console
$('.levelFour > li')
It will list all the elements which are targeted by the event handler at the point of execution. It will vary time to time depends on your dom structure.
Try this
$('.levelFour').on('mouseover','> li',function(m){
//something
}).css("border","1px solid red");
will change the border of element to red. hope it helps.