Uncaught TypeError: Cannot read property ‘msie’ of undefined – jQuery tools

The $.browser method has been removed as of jQuery 1.9. jQuery.browser() removed The jQuery.browser() method has been deprecated since jQuery 1.3 and is removed in 1.9. If needed, it is available as part of the jQuery Migrate plugin. We recommend using feature detection with a library such as Modernizr. — jQuery Core 1.9 Upgrade Guide. As stated in the Upgrade Guide you … Read more

Relation between CommonJS, AMD and RequireJS?

RequireJS implements the AMD API (source). CommonJS is a way of defining modules with the help of an exports object, that defines the module contents. Simply put, a CommonJS implementation might work like this: Basically, CommonJS specifies that you need to have a require() function to fetch dependencies, an exports variable to export module contents and a module identifier (which describes the location of the module … Read more

Sorting HTML table with JavaScript

Just revisiting an old solution, I thought I’d give it a facelift for it’s ~5 year anniversary! Plain Javascript (ES6) Does alpha and numeric sorting – ascending and descending Works in Chrome, Firefox, Safari (and IE11, see below) Quick explanation add a click event to all header (th) cells… for the current table, find all rows (except the first)… sort the rows, based on … Read more

Youtube api – stop video

You can’t control it if you embed it with an iframe. You have to use object embedding, like this: The rest of your code should generally work after that, although it may need to be updated to say: Also, have you seen the demo site? http://code.google.com/apis/youtube/youtube_player_demo.html