How To Make Firefox Focus on the URL not Search in a New Tab

Author: , September 5th, 2017

Set browser.autofocus to false in about:config

How To Implement Hybrid jQuery UI Dialogs

Author: , June 19th, 2012

jQuery 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 var self  = this; self.Dialog  = jQuery(’#yourDialog’); if (self.Dialog.length) […]

How To Create An Input Field Watermark Using jQuery

Author: , September 20th, 2011

Here is a VERY simplistic watermark code snippet. It has the distinct disadvantage of submitting the watermark string as the field value, and does not set the initial field value either…YMMV… 1 2 3 4 5 6 7 jQuery(’#yourInput’)    .focusin(function() {       if (jQuery(’#yourInput’).val() == ‘Enter keywords to search for’) jQuery(’#yourInput’).val(”);   […]

How To Focus On The First Form Element Using jQuery

Author: , June 10th, 2011

1 jQuery(’form :input:visible:enabled:first’).focus(); jQuery(‘form :input:visible:enabled:first’).focus();

How To Find The Type Of The Current Element Using jQuery

Author: , May 17th, 2011

Important Note: This solution REQUIRES jQuery 1.6 or better due to the addition of the :focus selector! Here is how I used it for a form in a jQuery UI dialog: 1 2 var Info = jQuery(this).find(’:focus’).get(0).tagName; if (tagName == ‘INPUT’) return false; var Info = jQuery(this).find(‘:focus’).get(0).tagName; if (tagName == ‘INPUT’) return false;

How To Bind jQuery .live() To Multiple Events

Author: , April 17th, 2011

As of jQuery 1.4.1 .live() can accept multiple, space-separated events, similar to the functionality provided in .bind(). For example, we can “live bind” the click and focus events at the same time like so: 1 2 3 jQuery(’.datepick’).live(’click focus’, function () {    jQuery(this).datepicker(’destroy’).datepicker({showOn: ‘both’}); }); jQuery(‘.datepick’).live(‘click focus’, function () { jQuery(this).datepicker(‘destroy’).datepicker({showOn: ‘both’}); }); Another […]

How to Focus on the First Text Input Element in a Form with jQuery

Author: , November 22nd, 2010

jQuery(‘#theDiv :input:text:first’).focus();