Chrome Web Store – Visual Event – Show jQuery event listening code

Ever want to know which line of javascript code that is listening to a certain event on an element? Even when working with jQuery?

This tool for Chrome is really sweet!
Chrome Web Store – Visual Event.

However its seems to be native functionality in Chrome already?
See Paul Irish posting here:
https://groups.google.com/forum/#!topic/google-chrome-developer-tools/NTcIS15uigA

Didnt get it to work in my Chrome browser although. (just like the latest posts in above forum – just shows jquery source code)

Namespacing in Javascript

Why bother with namespaces in javascript?
– You get cleaner and more clear code.

It is more clear what “object” or “task” the function and variables belongs to.
Avoids global function conflicts, my function named Calculate() might conflict with another function inside some js file that has been loaded before my js file.

This is one way of doing it, which I personally prefer:

Another way is this (enclose in sub braces)

Read even more about it here http://thanpol.as/javascript/development-using-namespaces/

Avoid unnecessary text selection on web pages

You know that annoying thing that happens when you try to click a link or a button on a page and you miss, and accidentally marks some text or html:

ScreenShot424
There is a fix for that.

Css fix:

via javascript: Disable Text Select – Stack Overflow.

Js IE fix: (probably needed for some versions of Internet Explorer…)

Jquery IE fix:

http://stackoverflow.com/questions/2700000/how-to-disable-text-selection-using-jquery

I havent tested these anywhere… yet. But Stack Overflow  is usually right.