Javascript
Javascript is a cool language, with a volume of libraries and frameworks to rival Java. These are the Javascript dependencies occuring on molk.ch:
| Name | Version | Licence | Local file(s) | Home | Sample molk.ch Usage | Description |
|---|---|---|---|---|---|---|
| jQuery | 3.1.1 | MIT | jquery.js | jquery.com | links via tag-filter | Very cool general framework which hides much of the
browser-specific complexity and enables really easy DOM navigation
and manipulation:
$("this").fadeOut();
|
| fotorama (jQuery Plugin) | 4.6.4 | MIT | fotorama.js fotorama.css fotorama.png fotorama@2x.png | fotorama.io jquery.com/fotorama | dragster gallery | Simple way to give an overview of a bunch of pictures - list
them under an element with an id and:
$('#gallery').fotorama();
|
| url (jQuery Plugin) | 2.4.1 | MIT | url.js | jquery.com/url url home | tag-filter | Simplifies extracting parts of a url:
// Yields "myvalue" on "/page.html?myparameter=myvalue"
$.url('?myparameter);
Also works well without jQuery. |
| QUnit | 2.2.0 | Licence | qunit.js | qunitjs.com | tag-filter unit tests | Very cool framework for unit testing with or without jQuery:
QUnit.test("The Green tag is filtered", function(assert) {
assert.expect(2);
$("#links-tag-filter #Green").each(function() {
assert.ok($(this).hasClass('filter'), "Filter: " +
path($(this)));
assert.notOk($(this).hasClass('unfilter'), "Not unfilter: "
+ path($(this)));
})
})
The expected assert count is useful because without it the
test would pass if the selector erroneously does not match any
elements. |
The local filenames are the minified production library files, without version numbers because they are referenced wherever they are used, and it would be a pain to change all references when upgrading libraries.