Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Allow the CSS for visible/hidden slides to be overridden in settings #324

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions responsiveslides.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"manualControls": "", // Selector: Declare custom pager navigation
"namespace": "rslides", // String: change the default namespace used
"before": $.noop, // Function: Before callback
"after": $.noop // Function: After callback
"after": $.noop, // Function: After callback
"visibleStyle": {"float": "left", "position": "relative", "opacity": 1, "zIndex": 2}, // Object: jQuery CSS
"hiddenStyle": {"float": "none", "position": "absolute", "opacity": 0, "zIndex": 1} // Object: jQuery CSS
}, options);

return this.each(function () {
Expand Down Expand Up @@ -68,8 +70,8 @@
$pager = $("<ul class='" + namespace + "_tabs " + namespaceIdx + "_tabs' />"),

// Styles for visible and hidden slides
visible = {"float": "left", "position": "relative", "opacity": 1, "zIndex": 2},
hidden = {"float": "none", "position": "absolute", "opacity": 0, "zIndex": 1},
visible = settings.visibleStyle,
hidden = settings.hiddenStyle,

// Detect transition support
supportsTransitions = (function () {
Expand Down