forked from mdbootstrap/TW-Elements
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix removePsClasses() to remove classes properly
Fix #698.
- Loading branch information
Hyunje Jun
committed
Oct 19, 2017
1 parent
4479996
commit ae6cf02
Showing
2 changed files
with
53 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<link href="../css/perfect-scrollbar.css" rel="stylesheet"> | ||
<script src="../dist/perfect-scrollbar.js"></script> | ||
<style> | ||
#container { | ||
position: relative; | ||
margin: 0px auto; | ||
padding: 0px; | ||
width: 600px; | ||
height: 400px; | ||
overflow: auto; | ||
} | ||
#container .content { | ||
background-image: url('./assets/azusa.jpg'); | ||
width: 1280px; | ||
height: 720px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="container"> | ||
<div class="content"> | ||
</div> | ||
</div> | ||
|
||
<div style="width: 600px; text-align: center; margin: 30px auto;"> | ||
<button id="init">init</button> | ||
<button id="remove">remove</button> | ||
</div> | ||
|
||
<script> | ||
var $ = document.querySelector.bind(document); | ||
|
||
var ps; | ||
|
||
$('#init').addEventListener('click', () => { | ||
if (ps) ps.destroy(); | ||
ps = new PerfectScrollbar('#container'); | ||
}); | ||
|
||
$('#remove').addEventListener('click', () => { | ||
if (ps) ps.destroy(); | ||
ps = null; | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters