background preloader

JavaScript - JS

Facebook Twitter


Console. Images. Masks. Menu. Time. Touch. Pura Felicidad con Funciones Puras. Este artículo es una adaptación del capítulo 3 del libro digital: “Professor Frisby’s Mostly Adequate Guide to Functional Programming” [1] escrito por Brian Lonsdorf.

Pura Felicidad con Funciones Puras

Hasta hace unos años, la programación funcional se utilizaba más que nada en ámbitos académicos y de investigación. Sin embargo, en los últimos años ha cobrado gran popularidad en el desarrollo de aplicaciones debido a los beneficios de desempeño que otorga al generar código altamente paralelizable. Así que cualquier desarrollador que pretenda destacar, requiere saber programación funcional.

Una de las primeras cosas que hay que entender para hacer programación funcional es el concepto de una función pura. Una función pura es aquella que, dada una misma entrada, siempre regresa el mismo valor de salida y no tiene otro efecto secundario observable. Monet.js - Powerful abstractions for JavaScript. Introduction Monet is a library designed to bring great power to your JavaScript programming.

monet.js - Powerful abstractions for JavaScript

It is a tool bag that assists Functional Programming by providing a rich set of Monads and other useful functions. This library is inspired by those that have come before, especially the FunctionalJava and Scalaz projects. While functional programming may be alien to you, this library is a simple way to introduce monads and pure functional programming into your daily practises. Download Download the zip or tar ball. Extending JavaScript Objects in the Classical Inheritance Style. Many authors of JS libraries have made some attempt to emulate familiar Object-Oriented (OO) constructs such as those found in C++ and even more so in Java.

Extending JavaScript Objects in the Classical Inheritance Style

The goal is not so much to make JavaScript more Object-oriented, although that is a positive side effect. Rather, it's to make JavaScript objects more palatable to developers who grew up with OO languages. Submit file input via AJAX with jQuery the easy way - Planetjon. You make a webform that you’d like to be hipster about and submit by AJAX. jQuery makes this a breeze so there’s no problem.

Submit file input via AJAX with jQuery the easy way - Planetjon

You probably use serialize() to encode the form data, and all is well. But then you want to include a file input field with the form submission and your remote AJAX handler doesn’t receive it at all. Karma - Spectacular Test Runner for Javascript. Tipos de datos JavaScript. Tipos primitivos y objeto. Significado de undefined, null, NaN. Ejemplos (CU01112E) GitHub - rogeriotaques/valida: jQuery Plugin for client side easy form validations. Free Javascript Obfuscator - Protects JavaScript code from stealing and shrinks size.

Obfuscate Javascript Code OnLine for Free inserting it in a image - File upload progress bar with jquery. What is the cleanest way to get the progress of JQuery ajax request? JQuery ajax progress - HTML5 – Dave Bond. Update: See end of post for jQuery versions after 1.5.1 This is just another reason to love HTML5 and never let it leave your life ♥ The second version of XMLHttpRequest (XMLHttpRequest2) supports progress events… for upload and download!!!!

JQuery ajax progress - HTML5 – Dave Bond

HTML5 Video: Canvas Mirror. Awesome Media Queries in JavaScript - enquire.js. The Lowdown What is it?

Awesome Media Queries in JavaScript - enquire.js

Enquire.js is a lightweight, pure JavaScript library for responding to CSS media queries. JavaScript callbacks for media queries matching and unmatching. Clean & intuitive API Absolutely tiny - around 0.8kb minified & gzipped! Why should I use it? In responsive design, CSS media queries can only take you so far. enquire.js allows you to harness media queries in JavaScript, giving you the tools to create advanced responsive sites. Dependencies? None! The most you will need to do is provide a matchMedia polyfill if you wish to support old/incapable browsers. Event reference. DOM Events are sent to notify code of interesting things that have taken place.

Event reference

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.

jQuery Knob demo. Dual Sliding Panels - Demo. Jonom/jquery-focuspoint. MixItUp. Essential JavaScript Links. Inheritance and the prototype chain. JavaScript is a bit confusing for developers experienced in class-based languages (like Java or C++), as it is dynamic and does not provide a class implementation per se (the class keyword is introduced in ES6, but is syntactical sugar, JavaScript remaining prototype-based).

Inheritance and the prototype chain

When it comes to inheritance, JavaScript only has one construct: objects. Each object has an internal link to another object called its prototype. That prototype object has a prototype of its own, and so on until an object is reached with null as its prototype. null, by definition, has no prototype, and acts as the final link in this prototype chain.

StickyStack.js. POO en JavaScript – Prototipos. The Essentials of Writing High Quality JavaScript. Twice a month, we revisit some of our readers’ favorite posts from throughout the history of Nettuts+.

The Essentials of Writing High Quality JavaScript

This tutorial was first published in October, 2010. The brilliant Stoyan Stefanov, in promotion of his book, "JavaScript Patterns," was kind enough to contribute an excerpt of the book for our readers, which details the essentials of writing high quality JavaScript, such as avoiding globals, using single var declarations, pre-caching length in loops, following coding conventions, and more. This excerpt also includes some habits not necessarily related to the code itself, but more about the overall code creation process, including writing API documentation, conducting peer reviews, and running JSLint. These habits and best practices can help you write better, more understandable, and maintainable code—code to be proud of (and be able to figure out) when revisiting it months and years down the road. Animated heart prototype.

LoadGo - Your own images as a progress bar. SweetAlert. So...


What does it do? Here’s a comparison of a standard error message. The first one uses the built-in alert-function, while the second is using sweetAlert. Normal alert Code: AZEXO Slider for Wordpress. Jquery.easyAudioEffects.js. jQuery plugin to create Responsive 3D Fold Animation on Scroll. July 3, 2015 A jQuery plugin to create a beautiful and Responsive 3D Fold Animation on Scrolling. Created by nickavignone DownloadHomeExample scroll pane See it in action Example: 3D Fold Scroll Related posts: To install using Bower bower install responsive_3dfoldscroll. Transitioning Buttons - JavaScript. Maplace.js : A small Google Maps jQuery helper. jScrollPane - cross browser styleable scrollbars with jQuery and CSS. jScrollPane is a cross-browser jQuery plugin by Kelvin Luck which converts a browser's default scrollbars (on elements with a relevant overflow property) into an HTML structure which can be easily skinned with CSS. jScrollPane is designed to be flexible but very easy to use.

After you have downloaded and included the relevant files in the head of your document all you need to to is call one javascript function to initialise the scrollpane. You can style the resultant scrollbars easily with CSS or choose from the existing themes. There are a number of different examples showcasing different features of jScrollPane and a number of ways for you to get support. How to use. ECMAScript 6 is officially a standard. Providing Local JS and CSS Resources for CDN Fallbacks. In a recent podcast the topic of using Content Delivery Networks (CDN) to host common-place resources such as jQuery and Twitter Bootstrap came up. The merits of having access to large scale delivery infrastructures provided by Google and the possibility that the client will already have these asset cached are huge wins. One pessimistic comment which can arise however, is what happens if these CDN's suddenly become unavailable.

Though highly unlikely in the case of Google's Hosted Libraries, similar acts such development whilst offline may likely result in the same effect. To get around this, hosting fallback local version of the assets is a worthwhile investment. In this post I will go over three different techniques for achieving this by loading an arbitrary example of jQuery, Twitter Bootstrap JS and CSS. Basic The example implementation below is the simplest example of providing the client with fallback options. SaulBurgos/easyLocator.

Select2. Single select boxes Select2 can take a regular select box like this... and turn it into this... Alaska Multiple select boxes. Trabajando con el árbol de DOM - Javascript. Matiasdg/boxLoader-Jquery-Plugin. 10 Tips for Writing JavaScript without jQuery. Danny Markov jQuery is a great library. It came to be around the time when IE6 was the number one browser. Back then, there were quirks and differences that were tedious to work around and jQuery was the perfect tool for writing cross browser code. Today, however, web browsers have advanced a great deal from those days. We can comfortably use all features provided by ES5, and we have at our disposal awesome HTML5 APIs that make working with the DOM so much nicer. Equivalente de la función var_dump de PHP en JavaScript.

Para muchos desarrolladores de PHP la función var_dump representa una ayuda enorme a la hora de debuggear (depurar) nuestro código y ver que tipo de datos son los que contiene cada variable o si es un objeto o un array. En JavaScript podemos utilizar el console.log(); para ver el contenido de una variable u objeto y funciona de manera similar, sin embargo para aquellos que quieran seguir usando la función var_dump de PHP en JavaScript y depurar de la misma manera, aquí les paso el código con lo que podrán emular dicha función en JS. Se puede utilizar de la siguiente manera: Jquery.autoellipsis. Like this? Please share: jquery.autoellipsis is a jQuery plugin for automatically applying ellipsis on selected elements.

This plugin optimally uses the available space, unlike methods like character counting. Download The latest version of the jquery.autoellipsis library can be downloaded from here: