Skip to content

Commit

Permalink
Merge pull request #68 from lleblanc42/master
Browse files Browse the repository at this point in the history
Window Resize Re-render

Included a small piece of code the simply refreshes the current step
when the screen is resized.
  • Loading branch information
James Warwood committed Mar 6, 2016
2 parents 0cc344c + e306a36 commit fb2922e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
3 changes: 0 additions & 3 deletions bin/build
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,6 @@ step "uglifyjs $JS_SRC -o ${DEST}jquery.pagewalkthrough.min.js" \
# Make dist/css directory if it doesn't exist
step "mkdir -p ${DEST}css/" "Creating '${DEST}css/'"

# Check that less file is valid
step "lessc -l $LESS_SRC" "Linting LESS file"

# Compile less
step "lessc $LESS_SRC ${DEST}css/jquery.pagewalkthrough.css" \
"Compiling LESS into '${DEST}css/jquery.pagewalkthrough.css'"
Expand Down
8 changes: 8 additions & 0 deletions dist/jquery.pagewalkthrough.js
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,14 @@
}
);

/**
* WINDOW RESIZE RERENDERER
*/

$(window).resize(function() {
$.pagewalkthrough('refresh');
});

/**
* DRAG & DROP
*/
Expand Down
Loading

0 comments on commit fb2922e

Please sign in to comment.