I am trying to add a callback function on click (when user clicks the button second time).
I have
$('#toggle').live('click', function(){
$this=$(this);
$this.attr('id', 'detail')
turn()
}, function(){
$this.attr('id','detail_close')
turn()
})
I can't seem to change the id to detail_close and call turn() again after the second click. Any tips? Thanks a lot!