I have 2 anchor links (A. Saltter) and when a click is done, then a class 'active' arrow in it Click 'and the same name range is removed from the second anchor, as well as subtracting the opacity from 0.2.
Then I want to effect a fade when the user enters the anchor 'active-arrow' has not been applied to it, due to the mouse center and the full ambiguity back to 0.2 in the mouseages.
The problem is that both .not and : no do not work as expected, the hover effect works but if I ' Arrow 'class, I click on the anchor while rotating, but when the mouse leaves decreases apacey, then even then' active-arrow 'class is applied. Apart from this, Hover does not work for another link on which the 'active-arrow' has been removed.
There is some code to understand the bits of a hard work which is expected to help a bit.
* // If the class is not an active-arrow in a.selector, run the hover fed function * $ ("a.selector"). No. ("Active-Arrow"). HoverFade (); // Work for the first element $ ('a.selector-1') Remove the background image element ($ '(' a.selector-2 '). RemoveClass (' active-arrow '); // related image element (' ul # storage-objects -2 ') .Fedhat (1200) .addClass ('hide'); // Fade again and hide this list $ (this). AddClass ('active-arrow', 'sharp'); // current element $ ('ul # storage - Objects-1 ') Add a background image. RemoveClass (' hide '). Fidine (1800); // Show fade in the list ($ a.selector-2') .Fedetto (500, 0.2); // Fadeed Element $ (This). Fadeo (800, 1); // This element Programmed to fade to full opacity)};
I had included the code for the first anchor (a.selector-1) because the second anchor has the same code but only converts class names into a.selector-2 is.
In addition, the Hoverfade function is in a separate file, so we can reuse it.
jQuery.fn.hoverFade = function () {return.Each (function () {$ (this) .hor (function () {$ (this). Freda (500, 0.8) ;}, Function () {$ (this). Fadeo (500, 0.2);});});
}
Each anchor gets entangled in the link as well as fades up to a ul.
This is a case where you want to use or, in this way:
$ (" a.selector: not (active-arrow) "). Live ('Mousecenter', function ($) ($) (),. Freda (500, 0.8);}). Live ('Mouseway', function () {$ (this). Feadata (500, 0.2);});
If you use the top row, then this ( id
= all of these links will look like shared shared parents):
$ ("a.selector: no (active-arrow)", 'mouse center', function () {
your present The reason is that it does not work that this event connects the controller to the elements , the elements only select the selector when you find them binding , mousecenter
and mouseover
event handlers are bound to that element. The fact is that the change in classes later In fact, there is no difference, handlers are there to stay.
Using the approach given above, incidents are not directly on the elements, they are parents, document
In the case of .live ()
or # id
in the case of .delegate ()
. If there are mouse incidents on the tuna, they do bubbles, and parents see them, checks whether the selector is for match on the other handler right , and if this happens, then the class It has to be changed in fact, as it happens when this incident happens when it was bound.
Comments
Post a Comment