javascript - How to add the hover effect to an element taht is nested to an element with hover? -


I have a table that contains a range of 7 columns and rows when I hover a table row , Then the play button appears in column # 2, it is implemented with the help of:

  .table-hover> Cart & gt; Tr {boundary-left: 4px; Border-left-color: transparent, border-left-style: solid; & Amp ;: Hover {; Border-left-color: @active element color; & Gt; Thtdbackground-color: # f5f5f5} & gt; TD: nth-child (2) {background-image: url (picture / play_con page); Background position: center; Background-repeat: no-repeat}}   

and it looks like: play Line queued with the button

You can see that the green row has a play button. What I am trying to do - is to apply additional (additional) hover to the button.

If this is a link element, then I can just add a pseudo: I can class the link to hover and what do I want But this is not a link, when I click on the play button - the data must be sent to the server.

I got the solution here but the problem is that in my case all the images have been added via CSS and Jeffal Example, the images are added through the input element in the HTML code. The additional problem is that there are 2 images and I want to use

, so the question is what is the correct way to apply additional hover?

Thank you.

It is completely supported with just CSS or Javascript ( jQuery ).

Using CSS3: nth-child () Selector:

  #yourTable td {background: #ccc; Height: 2 AM; Width: 8 AM; } # Your table tr: hover td: nth-child (2) {background: red; }   

Ejected demo here:

or

Using jQuery to add hover class to a specific dom element :

  $ ('document'). Ready (work () {$ ('# yourTable tr'). Hover (function () {$ (this). Child ('td: eq (1)') ToggleClass ('hover');})}} ;   

Waste demo here:

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -