js slideToggle problem with defining loaded state

This commit is contained in:
Sanj 2012-02-07 16:41:23 +05:30
parent afda2f3f9b
commit ef3ba4e9bf

View File

@ -8,8 +8,11 @@ $(function() {
$(this).data("loading", true);
var $parent = $(this).parent();
if ($parent.find('.srtContainer').length > 0) {
$parent.find('.srtContainer').slideToggle();
var $container = $parent.find('.srtContainer');
if ($container.length > 0) {
// alert("hi");
$(this).data("loading", false);
$container.is(":visible") ? $container.hide() : $container.show();
return;
}