Skip to content

Commit

Permalink
disable 3d hover on smaller viewports
Browse files Browse the repository at this point in the history
  • Loading branch information
escherwd committed Sep 24, 2024
1 parent 57a7747 commit 7687601
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,20 @@ document.getElementById("menuToggle").addEventListener("click", () => {
}
});

// Universal Tilt
UniversalTilt.init({
elements: document.querySelectorAll('[tilt]'),
settings: {
// options...
shine: true,
'shine-opacity': 0.5,
'shine-save': true,
scale: 1.2,
exclude: /(iPod|iPhone|iPad|Android)/
},
callbacks: {
// callbacks...
}
});
// Universal Tilt (only initialize on devices larger than 'sm' breakpoint)
if (window.innerWidth > 640)
UniversalTilt.init({
elements: document.querySelectorAll('[tilt]'),
settings: {
// options...
shine: true,
'shine-opacity': 0.5,
scale: 1.2,
speed: 500,
exclude: /(iPod|iPhone|iPad|Android)/
},
callbacks: {
// callbacks...
}
});

0 comments on commit 7687601

Please sign in to comment.