javascript - .mouseover in jquery not working -
I'm trying to throw a simple "one object, another fade in" when the mouse is on the object function Unfortunately this does not seem to work in jquery. This is JS:
var fadeout = function (target) // Fade the logo and run Fidin (fade in the skull) {$ ( Target + '.logo'). FEDO (400, 0, fadein (target)); }; Var Fadin = Function (target) // Fade in $ $ (Target + '. School') FEDOTO (500,1); }; // Trigger Fadin When the mouse is more than an option $ ('# mortal'). Mouseover (feedout ('# mortal')); When I check the code in the console of Chrome, it works fine, but when I go to the mouse on a mouse, nothing happens. Here is the relevant HTML:
& lt; Div class = "choice_option" id = "mortal" & gt; & Lt; Img class = "logo" src = "img \ text \ 230px-WorldofDarknessLogo.png" & gt; & Lt; / Img & gt; & Lt; Img class = "skull" src = "img \ skulls \ mortal.png" & gt; & Lt; / Img & gt; & Lt; / Div & gt; and the relevant CSS:
.logo {/ * every option in the text logo _payment * / status: absolute; Z-index: 0; }. Skull {/ * every option_postname skull * / position: absolute; Z-index: 1; Opacity: 0; } What am I missing?
Your code is too complex to set up your mouseover handler The time only requires using the callback parameter: try $ ('# mortal'). Mouseover (function () {var $ logo = $ ('. Logo', this); var $ skull = $ ('. Skull', this); $ logo.fadeOut (function () {$ skull.fadeIn (); });}); In addition, the img tag should itself be clamped: & lt; Div class = "choice_option" id = "mortal" & gt; & Lt; img class = "logo" src = "img \ text \ 230px-WorldofDarknessLogo.png" /> & Lt; Img class = "skull" src = "img \ skulls \ mortal.png" /> & Lt; / Div & gt; Finally, the .skull div should have a display: any no, opactiy: 0 To work feedin or fadeaut
Comments
Post a Comment