Should all jquery events be bound to $(document)?

No – you should NOT bind all delegated event handlers to the document object. That is probably the worst performing scenario you could create. First off, event delegation does not always make your code faster. In some cases, it’s is advantageous and in some cases not. You should use event delegation when you actually need … Read more

Using jQuery to test if an input has focus

jQuery 1.6+ jQuery added a :focus selector so we no longer need to add it ourselves. Just use $(“..”).is(“:focus”) jQuery 1.5 and below Edit: As times change, we find better methods for testing focus, the new favorite is this gist from Ben Alman: jQuery.expr[‘:’].focus = function( elem ) { return elem === document.activeElement && ( … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)