Home » Development » HTML5 » Seite 9
When the defer attribute is present in the script tag, it specifies that the script is executed when the page has finished parsing. A requirement that is enforced by Google for example (Page-Speed ranking).
Currently the WordPress wp_enqueue_script provides no easy way to add new attributes, but there is a way around that :)
The below hack / filter needs to be added to your theme function.php. The filter should be your preferred solution, as the clean_url filter has been deprecated.
Make sure that your website / theme is still loading after adding these changes. If needed you can add more exceptions, as I did for jQuery.
Hack for WordPress before 4.1
Filter for WordPress 4.1+
Updated: 26.04.2015 – using clean Regexp
As part of our complete network upgrade, portalZINE.TV gets a complete facelift as well. The whole website has been streamlined in preparation for the new season.
„WebP is an image format employing both lossy and lossless compression. It is currently developed by Google, based on technology acquired with the purchase of On2 Technologies.“ – Wikipedia
As the WebP is not widely supported, you need to use polyfills or workarounds to actually use it. But it makes a lot of sense when you are building image heavy applications for the web. It decreases file-sizes immensely and supports transparency as PNG does.
To allow WebP upload in WordPress, add this to your functions.php:
Browsers with native support will show WebP images natively, for browsers without support deploy WebPJS developed by Google. Download and add it to your theme functions.php
This should do the trick and enable WebP for all modern browsers, see browser support on the WebPJS development page.
Using Modernizer + jQuery
Custom detection of SVG
„Holland America Line Reisprofile Test“ provides an interface for customers to find out which cruise type they are.
By sliding the images you are choosing your preferences and define your cruise type, which allows you to get an individual set of cruises sent to you.
Audiosprite is a node.js ffmpeg wrapper to concat small audio files into one single file. It even allows you to define the gap between each file.
Audiosprite – node.js ffmpeg wrapper to concat small audio files into one weiterlesen
Adding audio to a web project can be really a pain in the …. . Howler.js makes it almost painless to add audio for desktop or mobile solutions.
Just used the audio sprite feature in one of my projects to allow switching between sounds. Works perfectly on iOS after the first touch event.
howler.js / Github
Check out version 2.0 on Github, which provides even more solid features.
Visual Composer for WordPress provides many ways to extend its functionality. There are already many add-ons available for this dynamic page builder, but its easy to do the extending yourself, by following the hints in the documentation ;)
In this small tutorial we are adding a „type“ field to allow a special css class to be added to each of our row containers.
New Visual Composer element properties can be easily added by using the vc_add_param function. See documentation for more information. In our case we are adding a property to the vc_row element.
Extending the Visual Composer Row element with a new property weiterlesen
Appear.In: Hang out with friends, not with Google. Appear.In lets you set up a video chat room, send friends the link, and start talking. No accounts, no sign up necessary, just talk! Already reserved a room :)
WebRTC browser test