The gallery with photo-filters

Tags: , , , ,

The gallery with photo-filters

The gallery with photo-filters

Today I want to continue talking about Moon Gallery jQuery library. It’s time to consider photo-filters. There are two ways to transform images in JavaScript: 1. You can draw a canvas element and replace your image with it. 2. Or you can use SVG-filters. First way consumes significantly more resources, but it’s supported by almost all modern browsers. Second way is preferable, but it’s not supported by old Android devices. Moon Gallery supports both technics. You can even set your gallery so that SVG-filters will be used if a browser supports them, otherwise canvas will be used. Canvas filters The

Continue Reading

JQuery: making a masonry gallery for free

JQuery: making a masonry gallery for free

When you want to make a photo gallery you will  likely find the Moon Mega Grid Plugin among others. It’s a great tool for building galleries with a bulk of templates and settings. But it’s not free. Fortunately, there is a free version of this plugin: the Moon Gallery. It has the same functionality. But there are only two simple templates in the Free Pack. If you need something special you ought to create a template by yourself. Features integrated support for canvas and svg filters perfect for mobile devices simple templating tools built-in lightbox with retina support 2 retina

Continue Reading

TypeScript: defining a top-level function

I use Lift as a web framework. Lift allows to generate JavaScript code and than to execute it on the page. I needed to execute a JavaScript function from that generated code. Since I use TypeScript for frontend development, I faced a problem here: How to create a global scoped function? Something like: window.myFunction = function(){ // … }   Fortunately, I found a trick. Behold: ;( <any> window).myFunction = function():void { // … }   For TSX: ;( window as any).myFunction = function():void { // … }   Now you can call this function from JavaScript inside <script> tags

Continue Reading