$(document).ready(function () {
$("#divHeader")) {
$(this).hover(function () {
$(this).find('#edit').show();
$(this).find('#spandate').removeClass("datetime");
$(this).find('#spandate').addClass("edit");
},
function () {
$(this).find('#edit').hide();
$(this).find('#spandate').addClass("datetime");
$(this).find('#spandate').removeClass("edit");
});
});
In my page I have 3 div with same name (“divHeader”) , But it apply only first div and skip for other two.
please tell me how to apply on all using ID ?
Create a class, the example shows “aClass”, and use that. The eventhandlers for in out as shown will then find the element with id spandate within the div that is being hovered.