Dot Net Developer Dot Net Developer - 1 year ago 70
ASP.NET (C#) Question

How to toggle javascript functions using jquery

I have two javascript functions

function A(){
alert("A() function is called");

function B(){
alert("B() function is called");

// I need to toggle A() and B() here

How can I achieve this, can any one please help on this?

Answer Source

you can do by applying class to the button and write depends on class

Live Demo

 <input type="button" class="callA" value="click me" id="button" />