javascript - jCarousel issue - Hover images opacity settings -
After
So far I've got jCarousel to display, and loaded images via a txt file,
Do I want to show 4 images at a time, then when the user takes 1 image of the mouse to 30% of the other 3 images to fade the ambiguity. Then if they move the mouse in front of the image then I want this image to be 100% opacity and 30% opacity of the other 3 images.
The image with the mouse on it is always 100% opacity, and 30% others, so it stands out. When the user moves the mouse out of the jCarousel box, I want all the images to show 100% ambiguity.
I am using a code like this
Thanks.
Edit
Sorry, I must have added the code before, here it is: this is what I have done so far nickrance.co .uk / jcarousel / dynamic_ajax.html This works, it enters passive images, but I think that when mouse jcarousel exits from the div, it requires mouseout event to restore the opacity of all images. it occurs. In addition, it works only for the first 4 images, and I have 10 images in the carousel, others do not feel anything: s
New current code: .bind ("load", function () {var activeOpacity = 1.0, inactiveOpacity = 0.3, testOpacity = 0.3, fadeTime = 50, clickedClass = "Selected", thumbs = "#mycarousel li"; $ (thumbs) .fadeTo (1.0, activeOpacity); $ (thumbs) .hover (function () {$ (thumbs) .fadeTo (fadeTime, inactiveOpacity); $ (this ) .fadeTo (fadeTime, activeOpacity);}, function () {// simply fade out if the user thumbs if not click Done ($ (this) .hasClass (clickedClass)!) {$ (This). FadeTo (fadeTime, activeOpacity);}}) '.' $ (Thumbs) .click (function () {// Any of this Remove the selected category from other elements except var previous = $ (thumb + c + licked class) .eq (); var click = $ (this); if (clicked! == Previous) {Previous .removeClass (clickedClass);} Click Adclasses (clicked class). Fadeo (Fitime, ActiveOpicity); }); });
You can add this code to you and you will be okay:
$ (".jcarousel-wrapper"). ('Mouseleave', function () {$ (thumbs). FadeTo (fadeTime, 1.0);});
And your HTML should look something like this:
& lt; Div class = "jcarousel-wrapper" & gt; & Lt; Div class = "jcarousel" & gt; & Lt; Ul id = "mcherecel" & gt; & Lt; Li & gt; ...
After leaving your carousel all the images will get 1 fade with ambiguity ...
Comments
Post a Comment