Skip to content

Commit

Permalink
remove click event before applying it again
Browse files Browse the repository at this point in the history
  • Loading branch information
Panagiotis Papadatis committed Aug 24, 2015
1 parent ffceb07 commit 532f145
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions js/floativ.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* displayed while browsing a web page. This floating box disappears when the user reaches an element with
* a specific id.
*
* Version 1.1.3
* Version 1.1.4
*
*/
(function ($) {
Expand Down Expand Up @@ -40,6 +40,7 @@

$this.data("floativ", o); // Save settings
collapseBtn.hide(); // Hide minus-collapse sign
expandBtn.show();
floativWrapper.css({
height: o.height,
width: o.width
Expand Down Expand Up @@ -70,7 +71,7 @@
});

// Click expand button
expandBtn.on('click', function (e) {
expandBtn.off('click').on('click', function (e) {
e.preventDefault();
collapseBtn.show();
expandBtn.hide();
Expand All @@ -81,7 +82,7 @@
});

// Click collapse button
collapseBtn.on('click', function (e) {
collapseBtn.off('click').on('click', function (e) {
e.preventDefault();
expandBtn.show();
collapseBtn.hide();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "floativ",
"version": "1.1.3",
"version": "1.1.4",
"description": "floativ is a floating scroll-box at the bottom of the screen of your site that contains text, among other things, which can be displayed while browsing a web page. This floating scroll-box disappears when the user reaches an element with a specific id.",
"main": "floativ.js",
"scripts": {
Expand Down

0 comments on commit 532f145

Please sign in to comment.