Waterglass Effect with KineticJS
I needed to code a Waterglass fill effect for a project and this seemed to be a good KineticJS beginner example and a nice topic for a new blog post. I think especially the image preloader is a good learning example. Checkout the demo! You can view the running demo on jsfiddle and play live ...
jQuery AJAX Loader
This is a simple jQuery Ajax Loader you can use in your projects. If a Element of the site is loaded via Ajax, just trigger the $(‘#elementToLoad’).showLoaderPanel(); method before the ajax load, and in the callback of the load function, trigger the $(‘#elementToLoad’).hideLoaderPanel();. To generate a animated loader .gif, visit this site: http://www.ajaxload.info/. The CSS: ...
Tame Styled Blockquote Quotation Icons Positioning
Lately I run into a problem with styled blockquote quotation marks. This is a short explanation of the problem and a fix for all modern Browsers and IE>8. If the last line length of the blockquote text was near the right border, the quotation mark was overlapping the text. No Problem with shorter Texts. Let’s ...
Debug SimpleXML objects with Twig
Using SimpleXML objects in Twig templates sucks.. especially with older Twig versions. To at least debug them, I’ve added a custom twig filter with the following method:
|
1 2 3 4 5 6 7 |
public function debugSimpleXml($simpleXmlObject) { $json = json_encode($simpleXmlObject); $array = json_decode($json, true); echo '<pre>'; var_dump($array); echo '</pre>'; } |
The “magic” happens on line 3, the second attribute set to “true”, converts returned objects into associative arrays.
