Bind/Unbind a function
Bind/Unbind a function
Hi,
I have tabs where I call the following function on one of them:
-
$('a.tab-2').one("click", function(map) {
myOwnFunction();
});
It's important that this function is just called once otherwise
I get problems with the javascript application.
Now users can click on buttons to change the result. A ajax
request is made and affects also the javascript application.
For this reason the above function should be called again but
it doesn't as I use ".one()".
What I actually need is a function where I can bind the event
once, after the click it's unbinded and when clicking on other
buttons the event gets rebinded. Unfortunately I didn't find any
useful examples that would help me.
Any idea how I can solve this problem?
thx
TC