background preloader

35 top examples of JavaScript

35 top examples of JavaScript
JavaScript creates platforms that can engage a user and ensure that they remember your site and continue to revisit. It can be used to create games, APIs, scrolling abilities and much more. The internet is full of web design inspiration, including great examples of JavaScript being used to bring a website to life and provide great user experiences. 01. If you've ever watched Cosmos, you may remember Carl Sagan talking about the Cosmic Calendar. 14 billion years of events is a huge dataset, and displaying it in a browser is no easy task. The son of a historian, Stauber created Histography as a student at Bezalel Academy of Arts and Design, under the guidance of Ronel Mor. The site scans and indexes events from Wikipedia, grabs the article, and pulls in a Google image and YouTube video. 02. This online portfolio showcasing the talent of Italian 3D artist Filippo Bello was conceived, designed and developed internally at Adoratorio by Enea Rossi and Alessandro Rigobello. 03. 04. 05. 06.

Nouvelle Vague by ultranoir stringify - JavaScript The JSON.stringify() method converts a JavaScript value to a JSON string, optionally replacing values if a replacer function is specified, or optionally including only the specified properties if a replacer array is specified. Syntax JSON.stringify([, [, ]]) Parameters value The value to convert to a JSON string. replacer Optional A function that alters the behavior of the stringification process, or an array of String and Number objects that serve as a whitelist for selecting the properties of the value object to be included in the JSON string. space Optional A String or Number object that's used to insert white space into the output JSON string for readability purposes. Description JSON.stringify() converts a value to JSON notation representing it: Properties of non-array objects are not guaranteed to be stringified in any particular order. The replacer parameter The replacer parameter can be either a function or an array. Example with a function Example with an array The space argument See also

A Javascript When Function Mon Feb 20 2012 function when(conditionFunc, execFunc, interval){ if (conditionFunc()){ execFunc(); }else{ setTimeout(function(){ when(conditionFunc, execFunc, interval);}, interval); } } You have some code which should only execute when a condition is true. Use when like this... function libIsReady(){ return typeof(LIBRARYNAME) ! Categories

Documentation JSHint is a program that flags suspicious usage in programs written in JavaScript. The core project consists of a library itself as well as a CLI program distributed as a Node module. More docs: List of all JSHint options · CLI flags · Writing your own reporter · FAQ Basic usage The easiest way to use JSHint is to install it as a Node program. $ npm install jshint -g After you've done that you should be able to use the jshint program. $ jshint myfile.js myfile.js: line 10, col 39, Octal literals are not allowed in strict mode. 1 error If a file path is a dash (-) then JSHint will read from standard input. Configuration JSHint comes with a default set of warnings but it was designed to be very configurable. This setup allows you to have different configuration files per project. Configuration file is a simple JSON file that specifies which JSHint options to turn on or off. Inline configuration /* jshint undef: true, unused: true */ /* global MY_GLOBAL */ Directives jshint /* jshint strict: true */

Using Google's Closure to Compile and Verify your JavaScript 7, Mar 2013 A large application is nearly guaranteed to come with an equally large amount of JavaScript attached to it. During development it makes sense to divide the JavaScript of the application into multiple sensibly named files both to make finding specific functionality in the code base easier, and to keep the file length to a reasonable size for readability/comprehension purposes. More importantly though, this allows you to build modular, reusable components by separating functionality and sharing common methods within the application. However, when it comes time to move your site to the production environment, this development processes' inefficiencies become noticeable in slow loading pages. One way that these problems can be mitigated by combining all the multiple JavaScript files into a single compiled file. Introducing Google Closure The Google Closure Compiler is a tool designed to solve these problems. How to Get it Sounds great right? That's all there is to it! How to Use it

10 Useful JavaScript Solutions for Charts and Graphs The visual structures such as Graphs and Charts are a valuable presence in web development. The visual structures can easily simplify complex data and output that can be chosen to put a list of JavaScript graphs. Today we present 10 such JavaScript solutions for Charts and Graphs to make easy your website development much easier. JS Charts JS Charts is a JavaScript chart generator that requires little or no coding. jQuery Visualize The Visualize plugin parses key content elements in a well-structured HTML table, and leverages that native HTML5 canvas drawing ability to transform them into a chart or graph visualization. Highcharts Highcharts is a charting library written in pure JavaScript, offering an easy way of adding interactive charts to your web site or web application. jqPlot Computation and drawing of lines, axes, shadows even the grid itself is handled by pluggable “renderers”. TufteGraph PlotKit PlotKit is a Chart and Graph Plotting Library for Javascript. jQuery Sparklines Raphaël

jsPDF - Create PDFs with HTML5 JavaScript Library PDFs have become an essential element of document sharing. Our team recognised a significant challenge with generating these files and developed jsPDF, the ultimate solution for PDF generation. We took an innovative approach and made jsPDF open-source to encourage a collaborative community of developers to enhance its features and functionalities. With our easy-to-use application, you can create professional-looking PDFs in a matter of minutes, without the need for complex software or extensive training. Our intuitive interface allows you to generate any document type, including event tickets, reports, certificates, and more. Documentation Our documentation is generated from the source code, and we ensure it's up-to-date and comprehensive. Support While our open-source software doesn't come with free support, we offer competitive pricing for personalised project assistance.

Badass JavaScript

Related: