background preloader

CanJS

CanJS

Agility.js Javascript MVC library JavaScript Garden Function Declarations and Expressions Functions in JavaScript are first class objects. That means they can be passed around like any other value. One common use of this feature is to pass an anonymous function as a callback to another, possibly an asynchronous function. The function Declaration function foo() {} The above function gets hoisted before the execution of the program starts; thus, it is available everywhere in the scope it was defined, even if called before the actual definition in the source. foo(); // Works because foo was created before this code runsfunction foo() {} The function Expression var foo = function() {}; This example assigns the unnamed and anonymous function to the variable foo. foo; // 'undefined'foo(); // this raises a TypeErrorvar foo = function() {}; Due to the fact that var is a declaration that hoists the variable name foo before the actual execution of the code starts, foo is already declared when the script gets executed. Named Function Expression How this Works

Build Awesome Javascript MVC Applications - Spine Buyer Protection Program When you buy a domain name at Dan.com, you’re automatically covered by our unique Buyer Protection Program. Read more about how we keep you safe on our Trust and Security page. Next to our secure domain ownership transfer process, we strictly monitor all transactions. Fast & easy transfers 98% of all domain ownership transfers are completed within 24 hours. Hassle free payments Pay by bank wire and get a 1% discount or use one of the most popular payment options available through our payment processor, Adyen.

TOC | jQuery Table of Contents Plugin TOC is a jQuery plugin that will automatically generate a table of contents for your page. You can see an example of it on the left side of the page. Features Completely customizableClick to smooth scroll to that spot on the pageAutomatically highlight the current sectionExtremely lightweight (744 bytes gzipped)Can have multiple on a page Download Usage $('#toc').toc(); Options Defaults shown below Example CSS History View Future Figure out how to handle headlines on bottom of pageZepto.js support (should work, need to verify)Ender support Contributors Greg Allen (@greg_allen) jga.me petermichaux/maria dcneiner/TableOfContents Stapes.js - a (really) tiny Javascript MVC microframework Introduction For a quick introduction to Stapes, follow the tutorial, and write a todo app in less than 100 lines of code. Write your Stapes modules like this Then, use it like this. var module = new Module('Emmylou'); module.sayName(); Examples There are three examples available to get a taste on how to write a Stapes.js application. Code for these examples is available in the development download. Note that the two todo examples are also available from TodoMVC. Creation methods These methods aid in the creation and extension of classes, or modules. subclass Module.subclass( [object] ) Stapes.subclass( [object, classOnly] ) Create a new Stapes class that you can instantiate later on with new. Note that until Stapes 0.6.0 the preferred way of creating new modules was by using Stapes.create. You can add a constructor (the function that is run when you instantiate the class) property to the object. Note that it's perfectly valid to call subclass without any arguments at all. extend proto Event methods

Startups, This Is How Design Works – by Wells Riley Backbone.js Fixed Table of Contents Dropdown Menu with jQuery The menu on this page was inspired by the fixed drop-down menu on the Startups, This Is How Design Works website. This type of menu works best on a one-page site that has animated scrolling. View the same menu with no submenus or with triple-depth submenus. < Go back to the article | GitHub repo Call me Ishmael Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Circumambulate I stuffed a shirt As most young candidates Entering that gable-ended But what most puzzled Upon waking next morning about daylight, I found Queequeg's arm thrown over me My sensations were strange I quickly followed suit You could pretty plainly tell If I had been astonished at first But, besides the Feegeeans ▲ Top

DimitarChristoff/Epitome ##Tocify Requirements jQuery 1.7.2+ (It is always recommended to use the latest version of jQuery) jQueryUI Widget Factory 1.8.21+ (It is always recommended to use the latest version of the jQueryUI Widget Factory) Optional Dependencies Twitter Bootstrap or jQueryUI CSS Theme Note: A Twitter Bootstrap or jQueryUI theme is only required if you want to use either framework to style your table of contents. Notable Features Supports support Supports styling with or Supports show/hide animations with Supports Supports option to make sure a page is big enough to scroll to all table of content items Browser Support Tested in Getting Started Downloads Download the latest versions of... jQuery jQueryUI Widget Factory (You only need the Widget component underneath the UI Core dependency) Tocify (You only need jquery.tocify.js and jquery.tocify.css) Twitter Bootstrap or jQueryUI CSS Theme (Only required if you want to use either framework to style your table of contents) Include CSS and JavaScript files JavaScript Options

Focuses on striking a balance between size, ease of use, safety, speed and flexibility. by coderdan Feb 17

Related: