public marks

PUBLIC MARKS from decembre with tags javascript & dev

2018

JAVASCRIPT - IMAGE - LAZY LOAD - Lazy Loading Images? Don’t Rely On JavaScript! | Robin Osborne

(via)
One popular method to deal with this is to “Lazy Load” the images; that is, to only load the images just before the user will need to see them. If this technique is applied to the “above the fold” content – i.e., the first average viewport-sized section of the page – then the user can get a significantly faster first view experience. So everyone should always do this, right? Given the potential limitations, let’s work on a solution that can handle all my concerns: a. works without JavaScript (i.e., lazy loading is an enhancement) b. vanilla js – no dependencies on jquery or angularjs c. works with broken JavaScript (i.e., the browser supports JavaScript, but there’s a js error somewhere which causes your script to break; might not even be your fault!)

JQUERY - COOKIE - Easy jQuery Cookies: Get, Set, Update, Delete | kevinleary.net

(via)
The jQuery cookie plugin makes it very easy to create, update and access information using cookies.

JAVASCRIPT - REGEX - Les expressions régulières (partie 2/2) - Dynamisez vos sites web avec JavaScript ! - OpenClassrooms

(via)
Dans ce deuxième chapitre consacré aux regex, nous allons voir leur utilisation au sein du JavaScript. En effet, le premier chapitre n'était là que pour enseigner la base de la syntaxe alors que, une fois couplées à un langage de programmation, les regex deviennent très utiles. En JavaScript, elles utilisent l'objet RegExp et permettent de faire tout ce que l'on attend d'une regex : rechercher un terme, le capturer, le remplacer, etc.

DEV - Great Resources Every Beginning a Front-end Developer Should Bookmark by vydargis on CodePen

If you just get started your a front-end developer career, it might be overwhelming to learn something every day. To optimize your time, it might be useful to know solid resources, to keep up with a demanding programmers’ environment. In this brief article, you will find 6 useful resources that in my opinion I think every beginning a front-end developer career should bookmark.

DEV - COIN MINER - MALWARE - Found "coin-hive.com" script in site - https://coin-hive.com/ chez DuckDuckGo

How to block Bitcoin Mining in your browser: Found "coin-hive.com" script in site (example : http://nude.piks.site/)

DEV - FORMATION - Thimble par Mozilla — Un éditeur de code en ligne pour apprendre et enseigner

(via)
Thimble est un éditeur de code en ligne qui facilite la création et la publication de vos propres pages web tout en apprenant le langage HTML, CSS et le JavaScript

2017

DEV - CHROM - 2015 - Six Tips for Chrome DevTools | CSS-Tricks

(via)
This post will cover six popular tips for Chrome DevTools. You may have seen some of these before, but hopefully if you have they'll act as a refresher for what you can do during your Inspect Element journey.

JAVASCRIPT - LIBRARY - MediaElement.js - HTML5 video and audio unification framework

(via)
Easy partner, we can handle it. MediaElement.js is a blazingly fast and amazingly powerful HTML5 audio and video library that creates a unified feel for media files (MP4, MP3, FLV), streaming content (HLS, M(PEG)-DASH, RTMP), and embeddable players like YouTube, Vimeo, Twitch, DailyMotion, Facebook, and SoundCloud.

JAVASCRIPT - Infinite Scroll - 'infinite-scroll' Questions - Page 2 - Stack Overflow

Tagged Questions: Infinite Scrolling, also known as endless scrolling, is a technique that is widely used by websites and Web applications that host lots of content on a page where pagination would traditionally have been used. Infinite scrolling involves initially loading only one page of content. As the user ...

JAVASCRIPT - How do I include a JavaScript file in another JavaScript file? - Stack Overflow

Is there something in JavaScript similar to @import in CSS that allows you to include a JavaScript file inside another JavaScript file?

DEV - KEY - Javascript Char Codes (Key Codes) - Cambia Research

(via)
Javascript Char Codes (Key Codes) Interactive Demonstration and Lookup Table

DEV - Web developer guides | MDN

Web developer guides. These articles provide how-to information to help you make use of specific technologies and APIs.

JAVASCRIPT - syntax - What does "use strict" do in JavaScript, and what is the reasoning behind it? - Stack Overflow

The statement "use strict"; instructs the browser to use the Strict mode, which is a reduced and safer feature set of JavaScript. List of features (non-exhaustive) Disallows global variables. (Catches missing var declarations and typos in variable names) Silent failing assignments will throw error in strict mode (assigning NaN = 5;) Attempts to delete undeletable properties will throw (delete Object.prototype) Requires all property names in an object literal to be unique (var x = {x1: "1", x1: "2"}) Function parameter names must be unique (function sum (x, x) {...}) Forbids octal syntax (var x = 023; some devs assume wrongly that a preceding zero does nothing to change the number.) Forbids the with keyword eval in strict mode does not introduce new variables Forbids deleting plain names (delete x;) Forbids binding or assignment of the names eval and arguments in any form Strict mode does not alias properties of the arguments object with the formal parameters. (i.e. in function sum (a,b) { return arguments[0] + b;} This works because arguments[0] is bound to a and so on. ) arguments.callee is not supported [Ref: Strict mode, Mozilla Developer Network]

JSON - What is JSON? An Introduction and Guide for Beginners

in this JSON tutorial and guide, I’m attempting to provide a fairly comprehensive discussion of JSON, its history, and its usefulness. I’ll close with a list of some practical JSON tools that might come in handy in future projects. JSON Defined JSON stands for JavaScript Object Notation and it’s a data format. That is, it’s a way to hold bits of information, similar to a database. Although JSON originated outside the ECMAScript specification, it is now closely related to JavaScript with the spec now including a JSON object and many developers incorporating it as a quasi-subset of the language.

DEV - Modernizr - Alsacreations

Modernizr est voué à la détection des fonctionnalités navigateurs via JavaScript. Il permet de prévoir des alternatives (basées sur d'autres bibliothèques) pour les moteurs ne supportant pas l'une ou l'autre des propriétés CSS, HTML, etc.

DEV - 2009 - Useful Javascript, jQuery, and AJAX Tutorials and Resources – MLC#1 | The Blog of Joren Rapini

Many of these links are bookmarks to articles that were list themselves, so they included many items. What’s special about this list on Joren Rapini’s blog, you ask? Well, I have graciously copied and pasted the Firefox tags that I use to identify each one of these pages in my bookmarks, so you can copy and paste them right into yours! This should save you a lot of time, and give you an enormous wealth of resources to boot.

2015

jQuery - Tuto - Use jQuery to extract data from HTML lists and tables | Encosia

(via)
Mapping the data within HTML unordered lists. Using .map() against an unordered list is one of the most straightforward examples to start with. Imagine you had this simple HTML markup: .map() like this:

JavaScript Arrays

Un tableau contient une collection de données en une seule variable. Tableaux JavaScript peuvent contenir des données de tout type : chaînes, des nombres , des booléens , des objets , fonctions et autres tableaux. Les éléments de données dans un tableau sont appelées éléments. Chaque élément a un indice qui commence à zéro . [ 1 ] Les indices de tableau sont utilisés pour accéder à des éléments et créer de nouveaux éléments comme le montre

JAVASCRIPT - TUTO - Ajuster dynamiquement la hauteur des iframe - Forcer le redimentionnement

Votre page va devoir faire appel à Javascript. Vous devrez donc prévoir une alternative. __ Le seul moyen de garantir que le contenu de l'iframe occupera toute la place qui lui est nécessaire sur la page-hôtesse est de forcer le redimensionnement de l'espace qui lui est accordé, une fois que l'on connaît l'espace nécessaire, donc après chargement du contenu de l'iframe.__Ce “redimentionnement” a posteriori ne peut être effectué que par un code javascript. Si le principe est simple, il faut envisager le cas où la source chargée dans l'iframe n'est pas dans le domaine de la page-hôtesse. En effet, afin d'éviter qu'un iframe que l'on ne contrôle pas vienne interagir avec le code javascript de la page-hôtesse, les navigateurs bloquent ce genre d'interacton (Same origin policy) ! Nous verrons qu'il existe des moyens de contourner cette limitation de sécurité.__Enfin, la simplicité du principe se heurte aux facéties d'implémentation des différents navigateurs Web, en particulier d'IE. Toute solution devra donc être testée sur les navigateurs pour lesquels on souhaite qualifier la page-hôtesse.

jQuery - TUTO - AJAX simplifié avec jQuery

AJAX (littéralement : Javascript et XML Asynchrones). AJAX c'est le pont entre les langages serveur (PHP, .NET...) et JavaScript, cette technologie permet de faire communiquer les deux de manière asynchrone, c'est-à-dire qu'on a plus besoin de recharger toute la page mais seulement une partie de la page, en y insérant des informations qui viennent directement du serveur.

jQuery - TUTO - Le sélecteur jQuery - débuter en jQuery

$ : le sélecteur raccourci __ Encore une petite précision : dans mon extrait de code ci-dessus, vous voyez que j'ai ajouté un paramètre $ pour ma fonction anonyme, et que j'ai ensuite utilisé $() à la place de jQuery().__En fait, $() est un alias de la fonction jQuery() (un autre nom pour la même fonction), on l'utilise plus souvent que jQuery(), tout simplement parce que c'est plus court à écrire ! __ Le seul problème est que d'autres framework javascript (Mootools nottament) utilisent également $ comme raccourci, du coup si vous utilisez plusieurs frameworks sur la même page, il y aura des conflits. ___ Heureusement, jQuery propose un mode noConflict(). Dans ce mode, le raccourci $ n'est pas créé pour éviter les problèmes. Le mode noConflict est par exemple activé par défaut dans Wordpress, donc $ ne marche pas et il faut donc se rabattre sur jQuery() à la place, la loose -_-'. __ L'astuce que j'ai utilisée me permet d'utiliser $ comme raccourci SEULEMENT à l'intérieur de ma fonction anonyme. Comme ça, même sous Wordpress où le mode noConflict est activé, je pourrais utiliser $ à l'intérieur de mon jQuery(document).ready.

DEV -Code Examples - Google Charts — Google Developers

(via)
Here are some code samples to demonstrate using the Google Visualization API. Table Example Customized Table Example Gauge Example Interaction Example Full HTML Page Example Query Wrapper Example Table Query Wrapper Example Mouseover Tool Tip Example

decembre's TAGS related to tag javascript

ajax +   animation +   api +   article +   audio +   bib +   bibliotheque +   blog +   bookmarklet +   browser +   carte +   checkbox +   chrome +   code +   comment +   convert +   Cookie +   css +   demo +   design +   dev +   development +   documentation +   dom +   editeur +   editor +   example +   exemple +   extension +   fichier +   firebug +   firefox +   flash +   flickr +   FlickrSurf+ +   fonction +   format +   forum +   free +   function +   google +   google:maps +   greasemonkey +   guide +   hack +   howto +   htlm +   HTLM5 +   html +   image +   interface +   java +   jQuery +   json +   library +   link +   list +   liste +   maps +   mobile +   ocr +   online +   opensource +   outil +   php +   player +   plugin +   programmation +   reference +   regex +   Responsive +   ressource +   scale +   script +   scroll +   scrollbar +   site +   stackoverflow +   tag +   test +   text +   texte +   tips +   tool +   transform +   tuto +   tutorial +   tutoriel +   user +   userscript +   utilitaire +   video +   web +   web2.0 +   webdesign +   webdev +   xhtml +   xml +   xpi +   xul +