background preloader

QuirksMode - for all your browser quirks

QuirksMode - for all your browser quirks
Related:  JavaScriptfront-end

La fusion des marges en CSS Qu’est-ce que la fusion des marges? La fusion des marges est un mécanisme décrit dans la spécification CSS (CSS 2.1: Collapsing Margins). Il concerne les marges verticales (margin-top et margin-bottom) des éléments de type bloc. C’est un mécanisme qui, pour deux blocs qui se suivent, «fusionne» la marge inférieure du premier et la marge supérieure du deuxième. <p style="margin-bottom: 20px;"> Premier paragraphe </p><p style="margin-top: 30px;"> Deuxième paragraphe </p> Pourquoi ce mécanisme? La fusion des marges est très utile pour obtenir des espaces harmonieux entre les portions de texte. la marge supérieure correspond au retrait minimal souhaité avant l’élément; la marge inférieure correspond au retrait minimal souhaité après l’élément. Voici par exemple un code CSS simple qui exploite ce mécanisme, pour obtenir des espaces harmonieux entre les paragraphes: Fusion des marges entre un élément et son parent Exemple simple de fusion des marges enfant—parent Nous obtenons le résultat suivant:

Php Object Generator (3.0f) - Open Source PHP Code Generator PHP Object Generator, (POG) is an open source which automatically generates clean & tested Object Oriented code for your PHP4/PHP5 application. Over the years, we realized that a large portion of a PHP programmer's time is wasted on repetitive coding of the Database Access Layer of an application simply because different applications require different objects. By generating PHP objects with integrated CRUD methods, POG gives you a head start in any project. The time you save can be spent on more interesting areas of your project.Read more ›› Fast and scalable Generates clean+tested code Generates CRUD methods Generates setup file Generates parent-child relations Generates sibling relations Extensible via plugins Compatible with PHP4 & PHP5 Compatible with PDO Automatic data encoding Free Developer SOAP API Free for personal use Free for commercial use Open Source

3.0 and jQuery Compat 3.0 Alpha Versions Released It’s been a long time since we did a major release, and you certainly deserve one. So we’re glad to announce the first alpha of jQuery 3.0! Despite the 3.0 version number, we anticipate that these releases shouldn’t be too much trouble when it comes to upgrading existing code. There are actually two releases here. You can also get the alpha versions from npm: npm install jquery@3.0.0-alpha1 npm install jquery-compat@3.0.0-alpha1 Major changes Below are just the highlights of the major new features, improvements, and bug fixes in these releases. Simplified .show() and .hide() methods Everyone’s mental model of jQuery’s .hide() method is that it sets display: none in CSS. Well, no. Since these methods add a style attribute to the element, they don’t tend to play well with techniques like responsive design where the visibility of elements may also be set by media queries. .unwrap( selector ) Thanks

« Hannu's Plaza » Doing gravity right Now you may be thinking: "baah, I know how to do gravity.." but there's a big flaw in the commonly used Euler's method to handle the gravity (or other forces). Even all the Quake games have this problem. Then what is it? If you have more frames per second in Quake, your player will run faster and jump higher. There are some places in Quake where you can't jump high enough if you don't have enough frames per second. Most of the programmers do the gravity something like this: velocity = velocity + gravity*delta_time position = position + velocity*delta_time The algorithm above is ok but when delta_time changes or delta_time is too high, it causes many unwanted problems. velocity = velocity + gravity*delta_time/2 position = position + velocity*delta_time velocity = velocity + gravity*delta_time/2 That's it.. but you need proof, right? But what the bad algorithm actually does is shown in the picture on right. Here is how the new algorithm handles the integration: Results in practice

JQuery Cycle Plugin Check out Cycle2, the latest in the Cycle line of slideshows. The jQuery Cycle Plugin is a slideshow plugin that supports many different types of transition effects. It supports pause-on-hover, auto-stop, auto-fit, before/after callbacks, click triggers and much more. It also supports, but does not require, the Easing Plugin. The plugin provides a method called cycle which is invoked on a container element. Images are used in these demos because they look cool, but slideshows are not limited to images. Use the Effects Browser page to preview the available effects. For more about options, see the Options Reference page. Frequently Asked Questions Special thanks to Torsten Baldes, Matt Oakes, and Ben Sterling for the many ideas that got me started on writing Cycle in 2007.

Display inline-block, une valeur trop peu utilisée Floatera, floatera pas… mais pourquoi ne pas utiliser la valeur inline-block de la propriété display en CSS ? Vous connaissez certainement les valeurs block ou inline, mais moins celle de inline-block et pourtant elle peut vous servir dans bien des cas. Voyons dans quelles conditions nous pouvons l'utiliser (de manière non exhaustive) dans un premier temps, puis dans un second temps quelques difficultés dans son utilisation. Cette astuce a été publiée initialement sur le blog personnel de l'auteur, creativejuiz.fr à la date du Jeudi 17 mars 2011. Utiliser display: inline-block Par défaut les éléments input ont comme valeur de display celle de inline-block. Le formulaire Quelle transition ! Je vous propose cette forme de mise en page pour formulaire. Notre code CSS va donc nous permettre d'avoir un comportement homogène. La CSS : Aperçu du formulaire Une navigation horizontale (éléments de liste) Le code HTML : Le code CSS : Remarque : la valeur inline sur le li est suffisante dans mon exemple.

Pricing Urban Airship’s platform is built for business—we help the world’s largest and most mobile-savvy brands connect to customers at any scale and with a full-featured platform that includes push notifications and in-app messaging. Communicate with millions of users with confidence to engage users, convert buyers, and build loyalty. Our platform also supports the most sophisticated use cases through optional add-ons such as location-based messaging and location history. Our platform includes: Contact Sales

JavaScript reference This part of the JavaScript section on MDN serves as a repository of facts about the JavaScript language. Read more about this reference. Global Objects This chapter documents all the JavaScript standard built-in objects, along with their methods and properties. Statements This chapter documents all the JavaScript statements and declarations. For an alphabetical listing see the sidebar on the left. Control flow Block A block statement is used to group zero or more statements. break Terminates the current loop, switch, or label statement and transfers program control to the statement following the terminated statement. continue Terminates execution of the statements in the current iteration of the current or labeled loop, and continues execution of the loop with the next iteration. Empty An empty statement is used to provide no statement, although the JavaScript syntax would expect one. if...else Executes a statement if a specified condition is true. switch throw Throws a user-defined exception. var let in

Semantic Versioning 2.0.0-rc.2

Related: