1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

What is the best way to reassign the same event to a link?

Discussion in 'jQuery' started by gandalf117, Nov 25, 2013.

  1. #1
    Let's say you have some links. When the user clicks on link one you want to disable the link from firing again in case the user for some reason clicks on it again. But if the user clicks on the link two you want to do the same as you did for link one but also this time reassign the old event to link one so that link one can fire again if clicked. I want to be able to do this with multiple links.

    I can already do this in several ways that involve conditional statements and even external functions but what do you think is the neatest and most elegant way to handle this in jQuery?
     
    gandalf117, Nov 25, 2013 IP