Skip to main content

Bug Tracker

Side navigation

#4030 closed bug (invalid)

Opened January 30, 2009 02:41PM UTC

Closed January 31, 2009 09:48PM UTC

Show method callback not working properly

Reported by: pareshvarde Owned by:
Priority: major Milestone: 1.3.2
Component: unfiled Version: 1.3.1
Keywords: Show effect Cc:
Blocked by: Blocking:

here is my code:

function showProfile(id) {

$('#profile_' + id).show("slow", hideAllProfile(id));


function hideAllProfile(id) {

$(".profilePopup:not(#profile_" + id + ")").hide();


I have series of DIVs in my content. I want to make sure that I am opening a second divs it should close all others. Hence on call back of show methods I am calling "hideAllProfile" to hide all other divs. However this is not giving me expected result. This results in multiple DIVs being opened on my page.

Attachments (0)
Change History (1)

Changed January 31, 2009 09:48PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

When you say

you are executing the function immediately. The easiest way to pass a parameter is via a closure:

function showProfile(id) {
   $('#profile_' + id).show("slow", function(){
      $(".profilePopup:not(#profile_" + id + ")").hide();

If you need further help with jQuery, please ask on one of the jQuery forums rather than opening a bug report.