The alert doesn't get fire because the openClose() function is missing and it throw an error.
<div class="spoilertop" onclick="openClose('cbd6c32c3118dbbdc3fbdc37e0805292')">
How I can I unbind or better remove the onclick tag?
$('.spoilertop').click(function(){
$(this).attr('onclick','').unbind('click');
alert('f');
})
I tried $(this).attr('onclick','').unbind('click');
and e.preventDefault() but doesn't work.