Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
<script>
$(document).ready(function() {
$.shifter({
maxWidth: Infinity
maxWidth: Infinity,
appearFromLeft: true
});
});
</script>
Expand Down
7 changes: 4 additions & 3 deletions jquery.fs.shifter.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
* @param maxWidth [string] <'980px'> "Width at which to auto-disable plugin"
*/
var options = {
maxWidth: "980px"
maxWidth: "980px",
appearFromLeft: false
};

var pub = {
Expand Down Expand Up @@ -54,7 +55,7 @@
*/
enable: function() {
if (initialized) {
data.$body.addClass("shifter-active");
options.appearFromLeft ? data.$body.addClass("shifter-active shifter-left") : data.$body.addClass("shifter-active");
}
},

Expand All @@ -77,7 +78,7 @@
*/
destroy: function() {
if (initialized) {
data.$body.removeClass("shifter shifter-active shifter-open")
data.$body.removeClass("shifter shifter-active shifter-open shifter-left")
.off("touchstart.shifter click.shifter");

// Navtive MQ Support
Expand Down