background preloader

Awesome Media Queries in JavaScript - enquire.js

Awesome Media Queries in JavaScript - enquire.js
The Lowdown What is it? 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. Downloads & All That Jazz Latest Build Grab the latest code, ready to go, from one of the locations below: Development — unminified Production — minified If you wish to browse/fork the source, you can do so on GitHub. Install via Bower To install via the bower package manager, enter the following at the command line: bower install enquire Build From Source git clone cd enquire.js npm install grunt Quick Start Walkthrough Match

Related:  JavaScriptJavaScript - JSWeb ResponsiveIT & Technologies

The best way to load external JavaScript Posted at July 28, 2009 09:00 am by Nicholas C. Zakas Tags: Blocking, JavaScript, Performance Not too long ago, I wrote about loading JavaScript without blocking by creating a dynamic <script> tag. When <script> tags are in the flow of an HTML document, the browser must stop rendering and wait for the script file to download and execute before continuing (example).

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!!!! Taking Control of Image Loading Image loading seems to be something that’s either overlooked entirely, or handed off to unnecessarily large plugins. Having a beautiful, smooth and speedy loading experience for your site is a crucial part of good UX, and should be considered a common courtesy to your designer. After all, who wants to see their design spoiled by choppy line-by-line image loading every time they log on? 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

The Top 25 Responsive Design Tools Note: this piece was originally published on Net Magazine, who recently nuked about 10,000 articles when they moved over to Creative Bloq. In an effort to preserve the writing I did for them, I’m republishing those articles here on my blog. This article is still alive over at Creative Bloq, so you can also read it there. As responsive web design evolves, Brad Frost looks at some of the best tools, resources and thinking for crafting exceptional responsive experiences Browser Support? Forget It! What is meant by “browser support” when creating a website? Ensuring it is accessible by a browser is what I like to think of. Others may dream of pixel-perfection. Whatever “support” entails, browsers that don’t make the cut are universally ignored with much delight and little chance of being usable. It’s common practice to maintain a list of supported browsers. Lately, Internet Explorer 7 was stricken from this list by many agencies and freelancers I know.

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. 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. Responsive CSS Framework Comparison: Bootstrap, Foundation, Skeleton Bootstrap 4.0.0-alpha is a fairly large update to the framework. It has dropped Less support in favor of Sass, converted from px-based to rem-based sizing, improved its grid system, and dropped IE8 support. Also, all its JS plugins were re-written in ES6, it now uses a customized reset CSS file called Reboot, and offers flexbox support via a Sass boolean variable. In addition to this update, Bootstrap now offers themes at Also, Bootstrap will continue supporting version 3, unlike the dropping of version 2 support after the release of version 3.

Tips for the Aspiring Web Developer · A Beautiful Blog So you want to be a web developer…excellent choice! It’s a very rewarding position that can be a lot more fun than most other programming jobs. However, before you take the plunge into a career in web development, there are a few things you should probably consider. jQuery hide() vs. fadeOut() vs. animate() If you’ve ever used jQuery to fade out an element, you’ve probably discovered that there are a few ways to accomplish the effect. You could use hide(), fadeOut(), or animate() to change an element’s opacity, but what are the differences between these methods and are there any gotchas? Both hide() and fadeOut() work similarly in that they gradually change an element’s opacity to zero and then change the display style property to none (hide() will also change the height and width of an element to zero).

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). 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. While this is often considered to be one of JavaScript's weaknesses, the prototypal inheritance model is in fact more powerful than the classic model. It is, for example, fairly trivial to build a classic model on top of a prototypal model, while the other way around is a far more difficult task.

How to build a responsive HTML5 website - a step by step tutorial Rating: 8.6/10 (1247 votes cast) Required knowledge level: intermediate In this responsive web design tutorial we will create an awesome responsive HTML5 website starting from scratch. I tried to include as many different features as possible, so we will be dealing with a jQuery slider, CSS3 transitions and animations, CSS Media Queries and so on. This part of the tutorial will show you the HTML structure and the required scripts in a step by step tutorial.

20 Cool jQuery Text Effects With jQuery text effects you can do really cool and dynamic stuff on your web pages. However keep in mind that text effects in web design is far away from the popularity we saw in the early days of the Internet and in some cases can be best used as funny JavaScript effects. Back then text usually was flying around (just because it could), it was changing colors in rainbow style etc.

The 2014 Guide to Responsive Web Design (Image from Flickr user Davidd) Responsive web design has changed a lot over the last few years. Front end development teacher, Nick Pettit updates you on all that’s changed when it comes to making websites work on mobile devices. Responsive web design is a technique for building websites that work on mobile devices, tablets, and desktop screens. Not long ago, websites were typically designed specifically for laptop and desktop screen resolutions.