I have function which is removing and adding class into input tag, i want to when we add or remove class then one function should alert that you have made changes.
<head>
    <script type="text/javascript">
        $(function() {
            $('a').click(function() {
                $('input').removeClass()
                var cl = $(this).attr('class')
                $('input').addClass(cl)
            })
        })
        function activitydone() {
            alert('class change')
        }
    </script>
    <style>
        .first { border:solid 1px #F00 }
        .second { border:solid 1px #0F0 }
        .third { border:solid 1px #00F }
    </style>
</head>
<body>
    <input type="text" onchange="activitydone()" />
    <a href="#" class="first">first</a>
    <a href="#" class="second">second</a>
    <a href="#" class="third">third</a>
</body>
 
     
     
     
    