Case Insensitive JQuery contains selector
If you need to use :contains() as a selector but need a case insensitive one, you need to extend jQuery yourself: This function will do it: $.extend($.expr, { 'containsi': function(element,…
A bunch of ramblings about PHP programming, JQuery, MySQL and other 'stuff'
If you need to use :contains() as a selector but need a case insensitive one, you need to extend jQuery yourself: This function will do it: $.extend($.expr, { 'containsi': function(element,…
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…
So you want a little funky AJAX loader? Add this to your JS main core file…: $(document).ready(function() { //initiate an ajax start message $(document).ajaxStart(function() { //show the message $('#ajax_loading_indicator').show(); });…
Okay, so have you ever had a user call you up and say “the website is putting garbage into my notes” – and it turns out they are copying and…
Say you want to use a selector to select all controls with a certain class, apart from a particular one. Use the not selector: $('.selectedClass:not(#exceptionId)').functions(); Sweet.
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 using Netbeans for your development and you have a horrendous spagetti coded “if” statement, you can use a keyboard shortcut to go to the matching opening or closing bracket.…
I always end up leaving debug code in my pages for one reason or another. One of which is console.log() for the firebug extension. Now, if you leave this and…
Sometimes you want to pass a function around from script to script as a string containing the function name (well maybe not, but I have some legacy code that does…
When using JavaScript, you declare a variable using the var keyword. var myvariable = "a value"; These variables are globally accessible unless they are defined within a function. Javascript performs…