Skip to content
This repository has been archived by the owner on Apr 28, 2020. It is now read-only.

Commit

Permalink
Fix preventDefault bug
Browse files Browse the repository at this point in the history
  • Loading branch information
tavicu committed Oct 18, 2015
1 parent cd58620 commit 45613b1
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# bootstrap-confirmation v1.0.4
# bootstrap-confirmation v1.0.5

This is a fork of ethaizone's [original code](https://github.com/ethaizone/Bootstrap-Confirmation)

Expand Down
16 changes: 11 additions & 5 deletions bootstrap-confirmation.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Bootstrap Confirmation v1.0.4
* Bootstrap Confirmation v1.0.5
* https://github.com/tavicu/bs-confirmation
*/
+function ($) {
Expand Down Expand Up @@ -65,14 +65,20 @@
}
});

$(element).on('click', function(e) {
e.preventDefault();
});
if(options.selector) {
$(element).on('click.bs.confirmation', options.selector, function(e) {
e.preventDefault();
});
} else {
$(element).on('click.bs.confirmation', function(e) {
e.preventDefault();
});
}
}

if (!$.fn.popover || !$.fn.tooltip) throw new Error('Confirmation requires popover.js and tooltip.js');

Confirmation.VERSION = '1.0.4'
Confirmation.VERSION = '1.0.5'

Confirmation.DEFAULTS = $.extend({}, $.fn.popover.Constructor.DEFAULTS, {
placement : 'right',
Expand Down
4 changes: 2 additions & 2 deletions bootstrap-confirmation.min.js

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

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bs-confirmation",
"version": "1.0.4",
"version": "1.0.5",
"main": "bootstrap-confirmation.js",
"keywords": [ "bootstrap", "confirm", "confirmation"],
"description": "Confirmation plugin compatible with Twitter Bootstrap 3 extending Popover",
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"keywords": ["bootstrap", "bootstrap dialog", "bootstrap confirmation", "confirmation"],
"description": "Confirmation plugin compatible with Twitter Bootstrap 3 extending Popover",
"homepage": "https://github.com/tavicu/bs-confirmation",
"version": "1.0.4",
"version": "1.0.5",
"authors": [
{
"name": "Tavicu",
Expand Down

0 comments on commit 45613b1

Please sign in to comment.