But if u only want to collapse and expand, why dont use u  the toggle function?

(sorry for my poor english)

On 5/19/07, oscar esp <[EMAIL PROTECTED]> wrote:

I need to change click event for "each click" I have nex code:

function collapseSection(ID_SECCION)
{
        jQuery("#HS_"+ID_SECCION).bind("click",function()
{expandSection(ID_SECCION);return false;});
}

function expandSection(ID_SECCION)
{

jQuery("#HS_"+ID_SECCION).bind("click",function()
{collapseSection(ID_SECCION);return false;});
}

Then I have a TD with click event:
< td click="loadDiv(1)">

function loadDiv(ID_SECCION)
{
jQuery("#HS_"+ID_SECCION).bind("click",function()
{collapseSection(ID_SECCION);return false;});
}


Then If I execute and click on td first time begins a loop :
collapseSection expandSection...

Seems that click event is not consumed and then every time that I bind
"click" the click is executed....

I don't know how stop the loop!!!

Many thanks




--

[]´s Jean
www.suissa.info

  Ethereal Agency
www.etherealagency.com

Reply via email to