first unbind click and then bind (jquery)
问题 1.I have a onclick event on, $('#locations').click(function(){ $('#train').unbind('click'); //do some stuff } 2.Once the close button is clicked $('.close').click(function(){ //do some stuff } 3.Then again if I click #train $('#train').bind('click', function() { alert('train is clicked'); //do some stuff } Now the problem is #train is not firing.Is it to bind the event again on .close function? Please suggest.Thanks in advance. 回答1: Looking at your question, you do not seem to bind back the