Skip to content

Commit

Permalink
Added options for "scrollingHotSpotLeftVisible" and "scrollingHotSpot…
Browse files Browse the repository at this point in the history
…RightVisible" css classes
  • Loading branch information
Thomas Kahn committed Oct 27, 2013
1 parent eb96e51 commit 53e268a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions js/jquery.smoothDivScroll-1.3.js
Expand Up @@ -35,6 +35,8 @@
// Classes for elements added by Smooth Div Scroll
scrollingHotSpotLeftClass: "scrollingHotSpotLeft", // String
scrollingHotSpotRightClass: "scrollingHotSpotRight", // String
scrollingHotSpotLeftVisibleClass: "scrollingHotSpotLeftVisible", // String
scrollingHotSpotRightVisibleClass: "scrollingHotSpotRightVisible", // String
scrollableAreaClass: "scrollableArea", // String
scrollWrapperClass: "scrollWrapper", // String

Expand Down Expand Up @@ -494,8 +496,8 @@
// Before the fade-in starts, we need to make sure the opacity is zero
//el.data("scrollingHotSpotLeft").add(el.data("scrollingHotSpotRight")).css("opacity", "0.0");

el.data("scrollingHotSpotLeft").addClass("scrollingHotSpotLeftVisible");
el.data("scrollingHotSpotRight").addClass("scrollingHotSpotRightVisible");
el.data("scrollingHotSpotLeft").addClass(o.scrollingHotSpotLeftVisibleClass);
el.data("scrollingHotSpotRight").addClass(o.scrollingHotSpotRightVisibleClass);

// Fade in the hotspots
el.data("scrollingHotSpotLeft").add(el.data("scrollingHotSpotRight")).fadeTo(fadeSpeed, 0.35);
Expand All @@ -504,11 +506,11 @@
else {

// The left hotspot
el.data("scrollingHotSpotLeft").addClass("scrollingHotSpotLeftVisible");
el.data("scrollingHotSpotLeft").addClass(o.scrollingHotSpotLeftVisibleClass);
el.data("scrollingHotSpotLeft").removeAttr("style");

// The right hotspot
el.data("scrollingHotSpotRight").addClass("scrollingHotSpotRightVisible");
el.data("scrollingHotSpotRight").addClass(o.scrollingHotSpotRightVisibleClass);
el.data("scrollingHotSpotRight").removeAttr("style");
}

Expand All @@ -523,19 +525,19 @@

// Fade out the left hotspot
el.data("scrollingHotSpotLeft").fadeTo(fadeSpeed, 0.0, function () {
el.data("scrollingHotSpotLeft").removeClass("scrollingHotSpotLeftVisible");
el.data("scrollingHotSpotLeft").removeClass(o.scrollingHotSpotLeftVisibleClass);
});

// Fade out the right hotspot
el.data("scrollingHotSpotRight").fadeTo(fadeSpeed, 0.0, function () {
el.data("scrollingHotSpotRight").removeClass("scrollingHotSpotRightVisible");
el.data("scrollingHotSpotRight").removeClass(o.scrollingHotSpotRightVisibleClass);
});

}
// Don't fade, just hide them
else {
el.data("scrollingHotSpotLeft").removeClass("scrollingHotSpotLeftVisible").removeAttr("style");
el.data("scrollingHotSpotRight").removeClass("scrollingHotSpotRightVisible").removeAttr("style");
el.data("scrollingHotSpotLeft").removeClass(o.scrollingHotSpotLeftVisibleClass).removeAttr("style");
el.data("scrollingHotSpotRight").removeClass(o.scrollingHotSpotRightVisibleClass).removeAttr("style");
}

},
Expand Down

0 comments on commit 53e268a

Please sign in to comment.