I created a page contains the following code. There I need to alert a message. But it does not work. WHY ?
Code:
$(document).ready(function() {
$.hook('toggle');
$('#test').bind('onbeforetoggle', function(e){alert(e.type)});
$('#btnHide').click(function() {
$('#divTest').toggle();
});
});
hope some helps
http://jsfiddle.net/TzCXC/