|
@ -85,15 +85,23 @@ $.fn.accordion = function(parameters) { |
|
|
; |
|
|
; |
|
|
module.toggle(index); |
|
|
module.toggle(index); |
|
|
}, |
|
|
}, |
|
|
resetStyle: function() { |
|
|
|
|
|
module.verbose('Resetting styles on element', this); |
|
|
|
|
|
$(this) |
|
|
|
|
|
.attr('style', '') |
|
|
|
|
|
.removeAttr('style') |
|
|
|
|
|
.children() |
|
|
|
|
|
|
|
|
resetDisplay: function() { |
|
|
|
|
|
$(this).css('display', ''); |
|
|
|
|
|
if( $(this).attr('style') == '') { |
|
|
|
|
|
$(this) |
|
|
.attr('style', '') |
|
|
.attr('style', '') |
|
|
.removeAttr('style') |
|
|
.removeAttr('style') |
|
|
; |
|
|
|
|
|
|
|
|
; |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
resetOpacity: function() { |
|
|
|
|
|
$(this).css('opacity', ''); |
|
|
|
|
|
if( $(this).attr('style') == '') { |
|
|
|
|
|
$(this) |
|
|
|
|
|
.attr('style', '') |
|
|
|
|
|
.removeAttr('style') |
|
|
|
|
|
; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -134,19 +142,17 @@ $.fn.accordion = function(parameters) { |
|
|
$previousContent |
|
|
$previousContent |
|
|
.stop() |
|
|
.stop() |
|
|
.children() |
|
|
.children() |
|
|
|
|
|
.stop() |
|
|
.animate({ |
|
|
.animate({ |
|
|
opacity: 0 |
|
|
opacity: 0 |
|
|
}, settings.duration, module.event.resetStyle) |
|
|
|
|
|
|
|
|
}, settings.duration, module.event.resetOpacity) |
|
|
.end() |
|
|
.end() |
|
|
.slideUp(settings.duration , settings.easing, function() { |
|
|
.slideUp(settings.duration , settings.easing, function() { |
|
|
$previousContent |
|
|
$previousContent |
|
|
.removeClass(className.active) |
|
|
.removeClass(className.active) |
|
|
.attr('style', '') |
|
|
|
|
|
.removeAttr('style') |
|
|
|
|
|
.children() |
|
|
.children() |
|
|
.attr('style', '') |
|
|
|
|
|
.removeAttr('style') |
|
|
|
|
|
; |
|
|
; |
|
|
|
|
|
$.proxy(module.event.resetDisplay, this)(); |
|
|
}) |
|
|
}) |
|
|
; |
|
|
; |
|
|
} |
|
|
} |
|
@ -156,15 +162,16 @@ $.fn.accordion = function(parameters) { |
|
|
$activeContent |
|
|
$activeContent |
|
|
.stop() |
|
|
.stop() |
|
|
.children() |
|
|
.children() |
|
|
.attr('style', '') |
|
|
|
|
|
.removeAttr('style') |
|
|
|
|
|
|
|
|
.stop() |
|
|
|
|
|
.animate({ |
|
|
|
|
|
opacity: 1 |
|
|
|
|
|
}, settings.duration) |
|
|
.end() |
|
|
.end() |
|
|
.slideDown(settings.duration, settings.easing, function() { |
|
|
.slideDown(settings.duration, settings.easing, function() { |
|
|
$activeContent |
|
|
$activeContent |
|
|
.addClass(className.active) |
|
|
.addClass(className.active) |
|
|
.attr('style', '') |
|
|
|
|
|
.removeAttr('style') |
|
|
|
|
|
; |
|
|
; |
|
|
|
|
|
$.proxy(module.event.resetDisplay, this)(); |
|
|
$.proxy(settings.onOpen, $activeContent)(); |
|
|
$.proxy(settings.onOpen, $activeContent)(); |
|
|
$.proxy(settings.onChange, $activeContent)(); |
|
|
$.proxy(settings.onChange, $activeContent)(); |
|
|
}) |
|
|
}) |
|
@ -186,15 +193,13 @@ $.fn.accordion = function(parameters) { |
|
|
.show() |
|
|
.show() |
|
|
.stop() |
|
|
.stop() |
|
|
.children() |
|
|
.children() |
|
|
|
|
|
.stop() |
|
|
.animate({ |
|
|
.animate({ |
|
|
opacity: 0 |
|
|
opacity: 0 |
|
|
}, settings.duration, module.event.resetStyle) |
|
|
|
|
|
|
|
|
}, settings.duration, module.event.resetOpacity) |
|
|
.end() |
|
|
.end() |
|
|
.slideUp(settings.duration, settings.easing, function(){ |
|
|
.slideUp(settings.duration, settings.easing, function(){ |
|
|
$activeContent |
|
|
|
|
|
.attr('style', '') |
|
|
|
|
|
.removeAttr('style') |
|
|
|
|
|
; |
|
|
|
|
|
|
|
|
$.proxy(module.event.resetDisplay, this)(); |
|
|
$.proxy(settings.onClose, $activeContent)(); |
|
|
$.proxy(settings.onClose, $activeContent)(); |
|
|
$.proxy(settings.onChange, $activeContent)(); |
|
|
$.proxy(settings.onChange, $activeContent)(); |
|
|
}) |
|
|
}) |
|
|