I have a button, when clicked this button invokes a function that
changes the buttons html, and it's click. The problem is it somehow
maintains the old trigger code. Before I put the click functions in
their own functions (rather than just adding function(){} to the
parameter) it would gain code every click, so if you clicked the
button 4 times the code would execute both trigger functions 4 times,
then if you clicked it a fifth time it would do both functions 5
times.

I can't think of any way to resolves this besides reverting to
javascript code, and even then I'm not sure if it will work. I looked
at the jquery source, but couldn't figure out what the triggers code
was doing. (To me it looked like it was defining a bunch of function
that took in functions, but with no connection to the javascript
triggers >>)


Anyways this is my code:

$(function() {

   resetcButton();

});

function resetcButton()
{
   $("#cButton").click(closeButton);
}

function closeButton()
{
   $("#cButton")

}

Reply via email to