From ef3ba4e9bffb1ea85ff5ef4e49a642040838532f Mon Sep 17 00:00:00 2001 From: Sanj Date: Tue, 7 Feb 2012 16:41:23 +0530 Subject: [PATCH] js slideToggle problem with defining loaded state --- js/radia.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/radia.js b/js/radia.js index 77263bf..9cd235d 100644 --- a/js/radia.js +++ b/js/radia.js @@ -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; }