*I would like to use single a href link to call different functions .
On first click it should call first_function() and on second click it should call second_function.
Like toggling between two functions using same link. Suggest the best way to be done.*
Jquery Code :
$(function() {
var IntervalId;
function first_function() {
//code goes here
};
function second_function(){
//code goes here
}
$("#link2").click((function(){
second_function();
}));
$("#link1").click((function(){
first_function();
}));
});
Html Code :
<a href="javascript:void(0);" id="link2">Call function2</a>
<a href="javascript:void(0);" id="link1">Call function1</a>