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…
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…
So you want a little funky AJAX loader? Add this to your JS main core file…: $(document).ready(function() { //initiate an…
Okay, so have you ever had a user call you up and say “the website is putting garbage into my…
Say you want to use a selector to select all controls with a certain class, apart from a particular one.…
http://odyniec.net/projects/imgareaselect/ I have been using this excellent jQuery plugin which allows the user to draw a lasso around several objects…
If using Netbeans for your development and you have a horrendous spagetti coded “if” statement, you can use a keyboard…
I always end up leaving debug code in my pages for one reason or another. One of which is console.log()…
Sometimes you want to pass a function around from script to script as a string containing the function name (well…
When using JavaScript, you declare a variable using the var keyword. var myvariable = "a value"; These variables are globally…
If like myself, you often attach functions to elements using jQuery, for example: $('.btnName').live('click', function() { //do something }); There…