From eBabel wiki
Jump to: navigation, search

Get jQuery version in the console


Trigger event after typing in a box and a pause

$(selector).keyup(function () {
  typewatch(function () {
    // executed only 500 ms after the last keyup event.
  }, 500);


var typewatch = (function(){
  var timer = 0;
  return function(callback, ms){
    clearTimeout (timer);
    timer = setTimeout(callback, ms);

Source: Thread on Stackoverflow

Modal jQuery popup

bPopup is a really nice modal jQuery popup, with lots of variations.

Jquery selector with wildcard

Source: answer on StackOverflow

To get all the elements starting with "jander" you should use:


To get those that end with "jander"


See also the JQuery documentation.

Find all elements wider than a given width

$("*").filter(function () {
   return $(this).width() > 400;