background preloader

QuirksMode - for all your browser quirks

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

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.

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. Value properties These global properties return a simple value. Function properties These global functions—functions which are called globally, rather than on an object—directly return their results to the caller. Fundamental objects These are the fundamental, basic objects upon which all other objects are based. Numbers and dates These are the base objects representing numbers, dates, and mathematical calculations. Text processing These objects represent strings and support manipulating them. Indexed collections These objects represent collections of data which are ordered by an index value. Keyed collections Structured data Control abstraction objects Reflection Internationalization WebAssembly Other arguments Statements Control flow Block break var

Semantic Versioning 2.0.0-rc.2 80+ AJAX-Solutions For Professional Coding | Developer's Toolbox Advertisement Web-developers can create amazing web-applications with AJAX. Stikkit1, Netvibes2, GMail3 and dozens of further web-projects offer a new level of interactivity we’ve used to give up the idea of. Modern web-applications can be designed with enhanced user interfaces and functionalities, which used to be the privelege of professional desktop-applications. AJAX makes it possible to create more interactive, more responsive and more flexible web-solutions. And it’s the first step towards rich internet applications of the future. Asynchronous JavaScript and XML isn’t a new programming language, as it is often mistakingly called. In this article we’d like to present a list of over 90 useful AJAX-based techniques you should always have ready to hand developing AJAX-based web-applications. You may also want to take a look at the article 60 More Ajax and Javascript Solutions For Professional Coding9. AJAX Auto Completer 1. 2. 3. 4. 5. AJAX Instant Edit 6. 7. 8. AJAX Menus, Tabs 10. 11.

ericelliott/essential-javascript-links Recently I worked with Art Processors to create... - German for black Recently I worked with Art Processors to create the “Replay” feature for The State Library of New South Wales’ “Curio” — Essentially, you get to see which exhibits you viewed at the gallery after you’ve left (you’re geotagged through the building as you explore). One particular part of this build proved difficult, I thought it may be worth sharing — The polygonally (is that a word?) masked images: To get this effect to work on webkit browsers, I was able to use the proprietary webkit feature: -webkit-mask-image, with an SVG polygon image. In Firefox (or browsers that actually handle SVG well) — I hand modified the SVG polygon image, adding a clipPath that also contained a copy of the original polygon. I also added some IDs so that the clipPath and original polygon could be referenced separately, then it was just a matter of changing the CSS so webkit would reference the polygon and Firefox would use the clipPath.

Slimbox, the ultimate lightweight Lightbox clone · Version: 1.8 Category: MooTools Javascripts Introduction Slimbox is a 4 KB visual clone of the popular Lightbox 2 script by Lokesh Dhakar, written using the MooTools javascript framework. Note: Slimbox 2 is now also available. Demo Visit the Demo page to test the latest version. You can also test Slimbox for MooTools 1.2.5 and Slimbox for MooTools 1.11. Features From a functional point of view, Slimbox has the following added features compared to the original Lightbox: Slimbox is ready to launch as soon as the document is ready. From a design point of view, Slimbox is very different from Lightbox: The code is optimized to an insane level and has been written from scratch with efficiency in mind for the MooTools framework instead of the huge Prototype/Scriptaculous. The total download size for the required modules of mootools 1.3 + Slimbox 1.8, both minified and gzipped, is as small as 24 KB. Compatibility It works with both strict mode and quirks mode web pages. Older versions: Requirements Usage