selector - Targeting child elements jquery -
This code should target child element. The class should be secured and allocated it. Ref-hover, but it only specifies to do this
Simple HTML:
& lt; Div class = "see left" & gt; & Lt; Div class = "desc box" & gt; & Lt; H3 & gt; Anticorro & lt; / H3 & gt; & Lt; P & gt; Sound & lt; / P & gt; & Lt; / Div & gt; & Lt; Div class = "video box" & gt; & Lt; Iframe & gt; Acousticides iframe & lt; / Iframe & gt; & Lt; / Div & gt; & Lt; / Div & gt; JS here:
$ (document) .ready (function () {$ ('refer'). Hover (function () { $ (This). Children ('video'). AddClass ('ref-hover');}, function () {$ (this). Child ('video'). RemoveClass ('ref-hover');} );}); Example: (These blocks with players with sound blocks)
Is there a problem with the problem?
try it
$ (document) .ready (function ('$' (See reference). Hover (function () {$ (this). Children ('.video') addClass ('ref-hover');}, function () {$ (this) .video '). RemoveClass (' ref-hover ');});});
Comments
Post a Comment