Archive (23)

Javascript wait object exists (defer) Feb 3, 2017

Wait for an object to exist to execute some code, like jquery or googlemaps

Javascript alert dump Jul 14, 2016

Dump structured data in alert box with javascript

pagination with backbone Aug 11, 2015

Example backbone "filter" pagination

when to use require and when to use define Aug 10, 2015

Define: If you want to declare a module other parts of your application will depend on. Require: If you just want to load and use stuff.

jQuery tips Jul 31, 2015

Multiple ready to use jquery scripts

javascript public vs private members Apr 29, 2015

Patterns Public function Constructor(...) { this.membername = value; } Constructor.prototype.membername = value; Private function Constructor(...) { var ...

jquery plugin explained Feb 5, 2015

// --------------------------------- // ---------- Plugin Name ---------- // --------------------------------- // Brief plugin description // ------------------------ /* The semi-colon before the function ...

jquery / javascript simple plugin examples Feb 5, 2015

; (function ($) { function MyPlugin(elem, options) { // remember this object as self var self = this; // remember the ...

javascript contructor vs prototype Feb 3, 2015

var YourClass = function(){ var privateField = "somevalue"; this.publicField = "somevalue"; this.instanceMethod1 = function(){ //you may access ...

javascript static scope Jan 9, 2015

  myVar=0; function runMe(){ var myVar = 10; callMe(); } function callMe(){ addMe = myVar+10; } runMe(); alert(addMe); alert(...