background preloader

Javascript

JSbooks - free javascript books
Although JavaScript deals fine with the syntax of two matching curly braces for blocks, it does not support block scope; hence, all that is left in the language is function scope. function test() { // a scope for(var i = 0; i < 10; i++) { // not a scope // count } console.log(i); // 10} There are also no distinct namespaces in JavaScript, which means that everything gets defined in one globally shared namespace. Each time a variable is referenced, JavaScript will traverse upwards through all the scopes until it finds it. The Bane of Global Variables // script Afoo = '42'; // script Bvar foo = '42' The above two scripts do not have the same effect. Again, that is not at all the same effect: not using var can have major implications. // global scopevar foo = 42;function test() { // local scope foo = 21;}test();foo; // 21 Leaving out the var statement inside the function test will override the value of foo. // global scopevar items = [/* some list */];for(var i = 0; i < 10; i++) { subLoop();} JavaScript Garden JavaScript Garden
Javascript Flavors

mikeaddison93/angular.js · GitHub
Bower
unnamed pearl
Object.create() Object.create() The Object.create() method creates a new object with the specified prototype object and properties. SyntaxEdit Object.create([, ]) Parameters proto The object which should be the prototype of the newly-created object. propertiesObject Optional. Throws Throws a TypeError exception if the proto parameter isn't null or an object. ExamplesEdit Classical inheritance with Object.create() Below is an example of how to use Object.create() to achieve classical inheritance. function Shape() { this.x = 0; this.y = 0;} Shape.prototype.move = function(x, y) { this.x += x; this.y += y; console.info('Shape moved.');}; function Rectangle() { Shape.call(this); } Rectangle.prototype = Object.create(Shape.prototype); Rectangle.prototype.constructor = Rectangle; var rect = new Rectangle(); console.log('Is rect an instance of Rectangle?' If you wish to inherit from multiple objects, then mixins are a possibility. Using propertiesObject argument with Object.create() PolyfillEdit if (typeof Object.create ! See alsoEdit
Naked JavaScript

JavaScript_Enlightenment.pdf
Understanding Design Patterns in JavaScript Today, we're going to put on our computer science hats as we learn about some common design patterns. Design patterns offer developers ways to solve technical problems in a reusable and elegant way. Interested in becoming a better JavaScript developer? Republished Tutorial Every few weeks, we revisit some of our reader's favorite posts from throughout the history of the site. Solid design patterns are the basic building block for maintainable software applications. A design pattern is a reusable software solution Simply put, a design pattern is a reusable software solution to a specific type of problem that occurs frequently when developing software. patterns are proven solutions to software development problems patterns are scalable as they usually are structured and have rules that you should follow patterns are reusable for similar problems We'll get into some examples of design patterns further in to the tutorial. Creational patterns focus on ways to create objects or classes. Understanding Design Patterns in JavaScript
Today we have decided to showcase a 'map' of the current state of web animation by compiling highly regarded libraries, frameworks and plugins based on their versatility and performance. Infographic 1: The Map of Web Animation The infographic is divided into three sections, the first part is a selection of a few of the most comprehensive animation libraries which offer up all the tools one could ever wish for from easing functions and callbacks to timing control, not to mention the generic animation functions we have come to expect. Infographic 2: List of Tools The second section is dedicated to the various methods for animating UI elements and any others objects in the DOM like scroll animation, parallax, sprites, 3D transformations, physics engines, and transitions. Infographic 3: Performance Tips Last but not least, the third section lays out some basic performance tips to help choose between CSS or Javascript-based animation depending on the requirements of any given project. Web Animation Infographics: A Map of the Best Animation Libraries for JavaScript and CSS3 plus Performance Tips Web Animation Infographics: A Map of the Best Animation Libraries for JavaScript and CSS3 plus Performance Tips
15 Beautiful Text Effects Created with CSS Beautiful text or typography will make your design look attractive. In web design, CSS helps to give style to design including various effects in text or typography. With CSS, you can use clipping and add animation to text to spice things up a little. And to illustrate this, we have collected 15 stunning and cool text effects that are made possible with CSS (some with a little help from Javascript codes). For more things you can do with CSS, check out: Elastic stroke Animation Yoksel animates the stroke of the text with a cool color scheme. SVG Glitch Want to make effects that look like a broken analog TV? Shop Talk logo The Shop Talk logo is recreated by Hugo using only CSS. Slashed Effect This idea by Robet Messerle gives the knife sliced effect, done with less than 70 lines of CSS. Elegant Shadow Effect Long Shadow effect comes to text, made using CSS. Foggy text effect Andreas creates an awesome cinematic foggy effect. SVG text mask Text Animation Hit The Floor Background Clip Text CSS Text-FX 15 Beautiful Text Effects Created with CSS
6 CSS Tricks to Align Content Vertically 6 CSS Tricks to Align Content Vertically Let’s talk about vertical alignment in CSS, or to be more precise how it is not doable. CSS has not yet provided an official way to center content vertically within its container. It’s a problem that probably has frustrated web developers everywhere. But not to fear, in this post, we’re going to run by you a few tricks that can help you imitate the effect. These tricks may however have limitations, and you may have to use more than one trick to complete the illusion. Recommended Reading: How To Obtain Equal Column Height With CSS 1. The first trick we are going to see here uses the position property. We will first set the position of the container element to relative, then we set the child element position to absolute. To align it vertically, move the child element position from the top, by half of the container’s height, and pull it up by half of the child element width. 2. CSS3 Transform has made it easy to put content at the center. 3. 4. 5. 6.
Web - HTML / CSS / JavaScript

Introduction To Photoshop Scripting Introduction To Photoshop Scripting Automation is useful in the work of every designer. It saves precious time on repetitive tasks and helps us solve certain problems more quickly and easily. You can automate your workflow in Photoshop with actions, which are pretty popular and which most of you already know about and use. Today, we’ll introduce you to an advanced automation technique: scripting. All you need for this is basic knowledge of JavaScript, which some of us Web designers already have. I’ve known about Photoshop scripts for years but decided to really dive in a few months ago. But first, we have to answer the obvious question. Why Do We Need Scripts? Why should we would learn to script if Photoshop already has pretty nice actions? A script is more dynamic; its behavior changes according to the parameters you input or the context of its application. Requirements Link You don’t have to be an advanced programmer to be able to write scripts; I’m just a graphic designer, like most of you. Getting Started Link Tools Link
Ps script / javascript / Batch renaming / etc

Best Photoshop Export Action Ever | Uncorked Studios Best Photoshop Export Action Ever | Uncorked Studios Recently here at Uncorked we’ve been looking at ways to optimize and improve our processes, and in reflecting on how we do things here at Uncorked, I brought up the number of times I’ve been standing over a designers shoulder and been telling them to “just press F5”. A blank stare always ensues, huh? While I’ve been using this export action for forever myself, I’ve never shared it. Shame on me. Provided here is an action set containing two actions: Layer Export (F5)Layer Export Retina (F6) After downloading and unzipping, go to your Actions palette in Photoshop and from its options pulldown, select “Load Actions...” and choose the unzipped file. So what do they do? Select any layer in your photoshop document. The “retina” version will actually prompt you a second time to save an asset. So what’s it doing under the hood? The stuff about the group nesting and flattening is very relevant and the missing key to many other people's attempts at this same thing. flare@2x.png flare.png
Introduction To Photoshop Scripting
jquery - Animate.css + Viewport Checker delay?
JavaScript-2

On scroll animations using waypoints.js and animate.css - On scroll animations using waypoints.js and animate.css - Did you ever wonder how the best themes implement on scroll animations? This tutorial will allow you to recreate the effect using the popular jquery-waypoints plugin as well as the animate.css library. On scroll animation is a technique which has gained popularity over the past several months. It suits one-page websites as well as websites with many illustrations perfectly, giving them a more dynamic appearance. However, the animations can be applied to any element as we will soon see. For this tutorial we assume the reader has some prior experience with javascript and more specifically with the jQuery library, as we will need the aid of the popular jQuery-waypoints plugin. The following example will alert the user when he scrolls on any element that has a class ‘notify’: One can pass a second argument to the waypoint function, which is an options object. In the example above we express the offset as a percentage of the viewport’s height. But what if I want staggered animations?
Detecting a "Touch Screen" Device Using Modernizr Detecting a "Touch Screen" Device Using Modernizr I’m amazed at how the mobile phone evolved over the years. Today, mobile phones are touch-enabled, can be used to surf sites like on a desktop PC, and carry a lot of handy apps to help you be more productive. When we build responsive websites that aim for mobile devices, sometimes we want to include specific and extra capabilities for users to make use of its multi-touch capability. Pin it But before that, we need to first identify if the device has support for touch interaction, and it is easy to do so with Modernizr. Check out: Getting Started with Modernizr Feature Detection with Modernizr At the Modernizr download page, ensure that the Touch Event option is selected. You can then add this Modernizr.touch in your script. It’s a basic JavaScript that will show the following popup. Furthermore, you can also use this method to load touchSwipe, a jQuery plugin for touch gestures, conditionally. The above code will test for touch capability. Final Thought
Download jQuery | jQuery Compressed and uncompressed copies of jQuery files are available. The uncompressed file is best used during development or debugging; the compressed file saves bandwidth and improves performance in production. You can also download a sourcemap file for use when debugging with a compressed file. The map file is not required for users to run jQuery, it just improves the developer's debugger experience. To locally download these files, right-click the link and select "Save as..." from the menu. The jQuery 1.x line had major changes as of jQuery 1.9.0. Download the compressed, production jQuery 1.12.3 Download the uncompressed, development jQuery 1.12.3 Download the map file for jQuery 1.12.3 jQuery 1.12.3 release notes jQuery 2.x has the same API as jQuery 1.x, but does not support Internet Explorer 6, 7, or 8. Download the compressed, production jQuery 2.2.3 Download the uncompressed, development jQuery 2.2.3 Download the map file for jQuery 2.2.3 jQuery 2.2.3 release notes
Curriculum — JS for absolute beginners Auf Deutsch » On the first day, our goal is to learn enough JavaScript to be dangerous, and to get a good feel for the natural habitat (web, browser, HTML) of JavaScript programs. Tools We will be using the Google Chrome browser as our development environment for the course, because of the excellent developer tools it provides. If you have a strong, passionate affinity for some other browser (please let it not be Internet Explorer), you are also free to try and use that—most modern browsers have decent developer tools—but the text on these pages will describe the Chrome functionality. If you don't already have Chrome installed, get it here: Beyond a browser, no desktop software will be necessary. Process The first few hours will be spent working with trivial pieces of programs, in order to get a feel for the language. This document will provide you with step-by-step guidance for exploring the browser and its JavaScript environment, and for writing your first few programs. Example step Goal
JavaScript - jQuery

HTML Event Attributes
JavaScript events and CSS classes

curriculum/README.md at master · dev-academy-programme/curriculum
Event reference DOM Events are sent to notify code of interesting things that have taken place. Each event is represented by an object which is based on the Event interface, and may have additional custom fields and/or functions used to get additional information about what happened. Events can represent everything from basic user interactions to automated notifications of things happening in the rendering model. This article offers a list of events that can be sent; some are standard events defined in official specifications, while others are events used internally by specific browsers; for example, Mozilla-specific events are listed so that add-ons can use them to interact with the browser. Standard events These events are defined in official Web specifications, and should be common across browsers. Non-standard events Mozilla-specific events Note: those events are never exposed to web content and can only be used in chrome content context. XUL events Add-on-specific events Developer tool-specific events
Pearltrees
Add-in development best practices - Docs - Office Dev Center Effective add-ins offer unique and compelling functionality that extends Office applications in a visually appealing way. To create a great add-in, provide an engaging first-time experience for your users, design a first-class UI experience, and optimize your add-in's performance. Apply the best practices described in this article to create add-ins that help your users complete their tasks quickly and efficiently. Note: When you build your add-in, if you plan to publish your add-in to the Office Store, make sure that you conform to the Office Store validation policies. Provide clear value Create add-ins that help users complete tasks quickly and efficiently. Create an engaging first-run experience Engage new users with a highly usable and intuitive first experience. For templates that illustrate patterns that you can apply as you develop your first-run experience, see UX design patterns for Office Add-ins. Use add-in commands Apply UX design principles Optimize for touch Market your add-in
The UX design patterns for Office Add-ins project includes HTML, JavaScript, and CSS files that you can use to create the UX for your add-in. Use the UX design patterns project to: Apply solutions to common customer scenarios.Apply design best practices.Incorporate Office UI Fabric components and styles.Build add-ins that visually integrate with the default Office UI. Using the UX design patterns You can use the UX designer specifications as a guide when you create your own UX design, or you can add the source code directly to your project. To use the specifications to build a mock-up of your own add-in UI: To add the source code: Clone the UX design patterns for Office Add-ins project repo. Types of UX design patterns Generic pages Generic page templates can be applied to any page in your add-in and don't have a special purpose. First-Run experience A first-run experience is the experience a user has when they open your add-in for the first time. Notifications General components UX design patterns - Docs - Office Dev Center
HTML5, CSS, y JavaScript

Color Picker — HTML Color Codes
Developer Network
HTML Table Style Generator by eli geske
JavaScript Libraries

Error – TypeError: d is undefined
Buttons - A button library built with Sass
An Animated Intro to RxJS
Stop Writing Slow Javascript - I Like Kill Nerds
JavaScript!

php function call using javascript
JavaScript Best Practices Part 1 · Thinkful Programming Guides
The 7 Best Java Frameworks for 2016
Java vs. JavaScript Build Tools – Thomas Uhrig
What are the major differences between Java, AngularJS, and JavaScript and Node JS? - Quora
JavaScript Jquery

javascript fevrier

maps javascript

HTML, CSS, PHP, Javascript, XML, Web Service y SOAP

JavaScript by @jerrywestfall _bak