preventDefault not firing on onkeyup event
Simple one. $(document).on('#element', 'keyup', function(event) { if (event.keyCode == 13) { event.preventDefault(); //do some other stuff } }); This doesn’t actually work as the Key Up event is too late…
A bunch of ramblings about PHP programming, JQuery, MySQL and other 'stuff'
Simple one. $(document).on('#element', 'keyup', function(event) { if (event.keyCode == 13) { event.preventDefault(); //do some other stuff } }); This doesn’t actually work as the Key Up event is too late…
http://odyniec.net/projects/imgareaselect/ I have been using this excellent jQuery plugin which allows the user to draw a lasso around several objects to highlight then and bulk change them. However, they way…
If like myself, you often attach functions to elements using jQuery, for example: $('.btnName').live('click', function() { //do something }); There is a nice little browser extension that will show all…
We all have to bind events to elements: $('#link).click(function(){ do some stuff }); But, what if that element doesn’t exist yet? Well, you can use the “live” handler: $('#link').live('click', function(){…