I have multiple elements with class test. If I hover them, they should have a red border around them because I wrap them around with div. It works, but how is it possible to wrap only active element, the one I’m hovering, not all the elements what have .test class?
$(".test").hover(function() {
$(".sample").wrap('<div style="border: 1px solid red;" />');
}
I’m not sure if this is what you are looking for but this will wrap all your enabled elements with the class test.