Archive for February, 2011

jQuery: How to test if an Object is a jQuery object

Friday, February 25th, 2011
if (obj.jquery){
 //it is a jquery object (and .jquery is the version)
 //it is not a jquery object

source jQuery Forum

iOS: WebKit UIWebView remove tap/click highlight/border with CSS

Thursday, February 10th, 2011
-webkit-tap-highlight-color: rgba(0,0,0,0);
-webkit-user-select: none;                /* disable text select */
-webkit-touch-callout: none;              /* disable callout, image save panel (popup) */
-webkit-tap-highlight-color: transparent; /* "turn off" link highlight */
  outline:0; // Firefox (remove border on link click)

Source: YUIBlog

Git: Ignoring a folder tree except a particular sub-folder

Monday, February 7th, 2011

So, this will exclude any sub-folders form a but will include the sub-sub-sub-folder a/b/c and exclude the file a/b/c/file.xml


jQuery: Bind and unbind the Esc key

Friday, February 4th, 2011

Let’s say you want to allow your dialog boxes to be close when the user press “esc.”

$("body").bind("keyup.myDialog", function(event){
   // 27 == "esc"
   if (event.which == 27) {
      // TODO: close the dialog
      // unbind the event