1
I have a table with 6 columns, but I just want to give hover
in the first 4 columns. It is possible to do this?
I’m using MVC 4
and bootstrap
I’m already using a method in Jquery
:
$(".table tbody tr").hover(function () {
$("table tbody tr .cell-padrao").each(function (index) {
$(this).css("background-color", "#FFF");
});
$(this).each(function (index) {
$(this).find(".cell-padrao").css("background-color", "#eee");
$(this).find(".cell-padrao").css("cursor", "pointer");
});
});
But every time I take the mouse off the line the Hover is still there. I need it to come out. Can you improve this method or has something in CSS
that can be done?
EDIT: I need him to give the 4 first (together) columns and the other 2 columns stay as they are, because they have hovers themselves
Just like that: http://uploaddeimagens.com.br/imagens/grid-png--3, But when you get out of Tr the Houver vanish too
That way it gives Hover and column by column, I need that when it passes the mouse on top of the first until the fourth column it gives Hover in the 4 together.
– Thiago Alex
updated the answer according to your doubt
– tiaguinhow
@Thiagoalex Please edit the question to make this clear, as you cannot know that this is your intention without reading your comment above. See that most of the answers you received don’t do what you want.
– bfavaretto
I didn’t really understand the question. I believe the options I left above will help solve your problem Alex, if useful, do not forget to positive the answer.
– tiaguinhow
@Thiagoalex this solved your problem ? do not forget to finish the topic.
– tiaguinhow