I have some elements on my webpage and I want to click on one of the elements when I click on it Is unchecked)
& Lt; / Div & gt; & Lt; / Div & gt; & Lt; Div class = "back" & gt; One class = "link" href = "# / portfolio / chicken.html" onclick = "gestionClic ('compteur11');" & Gt; & Lt; Div class = "element-image-back" & gt; & Lt; Div class = "element-image-back" & gt; & Lt; Img src = "./ Post thumbnail images / raspberrypyboard.jpg" /> gt; & Lt; / Div & gt; & Lt; / A & gt; & Lt; / Div> & Lt; / Div & gt; When I click on an element, it is class = "link" which is clicked. I tried to do this but it does not work:
$ ('.link'). Click (function () ($ ('. Element'). Sister () .animate ({session acety: 0.4}, 300); $ ('. Link') (function () {$ no ( 'Element'). Stop (). Animate ({obscurity: 1.0}, 300);});});
First: Clear your HTML elements! Second: Work on my demo $ ('. Element> img'). Click (function () {$ (this). ({Opacity: 0.4}) Brother Sister (). Chetan ({obscurity: 1});}); After clearing your HTML ...
& lt; Div class = "element" & gt; & Lt; Img src = "{SRC}" & gt; & Lt; Img src = "{SRC}" & gt; & Lt; / Div & gt; Then you can use
demo:
if you're actually your impure If you want to use HTML, just do this ...
$ ('Element img'). Find (". Element"). Find ("img"). (This) .mate ({opacity: 1}); $ (this) .met ({obscurity: 0.4});} ); Demo:
Example in your case: < Code> $ ('. Element & gt; .back & gt; .link'). Click (function () {$ (this). Value ({opacity: 1}); $ (this) .parents (". Element") .find ("front."; Element-image-front "). ({Opacity: 0.3});}); One more click: $ ('. Element & Gt; Forte & gt; .element-image-front ') .click (function () {$ (this) .animate ({opacity: 1}); $ (this) .parents (". Element"). ( ". Back> .link"). Animate ({obscurity: 0.3});}); Should be done in a function, but your HTML is unclear. Code 2 Function for% Work and 100% Full Focus Elements
Day Mo:
No comments:
Post a Comment