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.
Check out version 2.0 on Github, which provides even more solid features.
Version 2.0
Vivus is a lightweight JavaScript class (with no dependencies) that allows you to animate SVGs, giving them the appearence of being drawn. There are a variety of different animations available, as well as the option to create a custom script to draw your SVG in whatever way you like.
SVGMagic is a jQuery plugin that provides a nice server side fallback to convert SVG images to PNGs for older browsers (IE8, Android 2.*).
Also works for background images.
Serverside conversion of SVG to PNG
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.
Continue reading Extending the Visual Composer Row element with a new property
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 :)
In a perfect world all current browsers would allow the usage of WebRTC natively, but that is as always not the case ;)
“WebRTC (Web Real-Time Communication) is an API definition drafted by the World Wide Web Consortium (W3C) that supports browser-to-browser applications for voice calling, video chat, and P2P file sharing without the need of either internal or external plugins.” – Wikipedia
Fallback for console.log for those browsers that do not offer it or use this cross browser integration. Sadly we are still stuck with IE8 for some projects ;)
1 2 3 4 5 6 7 8 9 10 11 |
var alertFallback = true; if (typeof console === "undefined" || typeof console.log === "undefined") { console = {}; if (alertFallback) { console.log = function(msg) { alert(msg); }; } else { console.log = function() {}; } } |
There are many instances were you might like to define global variables, that can be used anywhere.
This does not work:
1 2 3 4 5 |
var my_variable = 1 $.getScript( "my_script.js", function() { alert(my_variable); }); |
This works:
1 2 3 4 5 |
window.my_variable = 1 $.getScript( "my_script.js", function() { alert(window.my_variable); }); |
In case of the first $.geScript function(){…} the my_variable is only availble within the scope of the function. In the second the variable is assigned to the window object and can be used within.
1 |
JSON.stringify(YOUR_OBJECT_HERE, null, 4) |
Still looking for a nice way to integrate this Terminal plugin it into some of my current websites :)