Skip to content

Commit 3f3cda6

Browse files
committed
Merge pull request #54 from stockholmux/master
Fixed issue with event handlers in smkPanel causing open/close issue. Thanks for the help @stockholmux
2 parents 3243220 + ae4b6b8 commit 3f3cda6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

dist/js/smoke.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ $.fn.smkPanel = function(options) {
11671167
var settings = $.extend({
11681168
hide: ''
11691169
}, options);
1170-
1170+
var thisPanel = $(this);
11711171
// Se eliminan los espacios en blanco de la variable settings.hide
11721172
var hideSinEspacios = settings.hide.replace(/\s/g, '');
11731173
// Se quiebra la variable hideSinEspacios para obtener sus valores y se agregan en el array arrayHide
@@ -1201,7 +1201,7 @@ $.fn.smkPanel = function(options) {
12011201
$(this).children('.panel-heading').append( btnGroup );
12021202

12031203
// Evento del boton Min
1204-
$('.smk-min').click(function(event) {
1204+
thisPanel.find('.smk-min').click(function(event) {
12051205
event.preventDefault();
12061206
var body = $(this).parents('.panel-heading').siblings('.panel-body');
12071207
var footer = $(this).parents('.panel-heading').siblings('.panel-footer');
@@ -1213,15 +1213,15 @@ $.fn.smkPanel = function(options) {
12131213

12141214
});
12151215
// Evento del boton Remove
1216-
$('.smk-remove').click(function(event) {
1216+
thisPanel.find('.smk-remove').click(function(event) {
12171217
event.preventDefault();
12181218
var panel = $(this).parents('.panel');
12191219
panel.fadeOut(400, function(){
12201220
//this.remove();
12211221
});
12221222
});
12231223
// Evento del boton Full
1224-
$('.smk-full').click(function(event) {
1224+
thisPanel.find('.smk-full').click(function(event) {
12251225
event.preventDefault();
12261226
var panel = $(this).parents('.panel');
12271227
var body = $(this).parents('.panel-heading').siblings('.panel-body');

0 commit comments

Comments
 (0)