Skip to content

Commit

Permalink
#1: Add type=button to buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpoort committed Jun 13, 2018
1 parent 3d91c6c commit 98d41af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/js/swipr.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swipr",
"description": "Swipe through horizontal content. Buttons for non-mobile/non-touch devices. Natural swipe for mobile/touch devices",
"version": "1.0.2",
"version": "1.0.3",
"homepage": "https://robinpoort.github.io/swipr/",
"author": "https://github.com/robinpoort/swipr/graphs/contributors",
"repository": {
Expand Down
2 changes: 2 additions & 0 deletions src/js/swipr.js
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,10 @@
// Add classes and content
$prevButton.classList.add(settings.swiprPreviousButtonClass);
$prevButton.innerHTML = settings.swiprPreviousButtonContent;
$prevButton.setAttribute('type', 'button');
$nextButton.classList.add(settings.swiprNextButtonClass);
$nextButton.innerHTML = settings.swiprNextButtonContent;
$nextButton.setAttribute('type', 'button');

// Add to the DOM
$swiper.parentNode.insertBefore($prevButton, $swiper);
Expand Down

0 comments on commit 98d41af

Please sign in to comment.