JavaScript performance tests
Oct 19, 2013     21:11:40

When we developing simple JS app / website we don't even need to test something. If everything is simple - there is no reason to make it hard.

But while developing plugins, libraries, or a project with fat ("powerful") client-side part, JavaScript performance has much higher priority.

The are a lot of ways to test different cases:

  • JSPerf.com - JavaScript performance playground;
  • console.time() method of testing some code part performance;
  • console.time('timerName');
    /* your code */
    console.timeEnd('timerName');
  • Self written timers;

CSS Tooltip
Sep 22, 2013     16:57:13

Today I'll try to show you a simple example how to create CSS3 tooltip (with HTML and no JavaScript) with a little bit of animation on show and hide.

Demo:

single lineSome tooltip text, multiple linesMultiple line tooltip text
and actually can be breacked with <br>.
and with tagsYou can use any kind of tags here


Lumia 800 in CSS3
Sep 08, 2013     19:45:51

A long time ago there was an iPhone... and iPhone created in CSS3.

Since that time I received a lot of emails and messages in social network, tweets and likes in facebook, etc.

And one day I received a message from Nishant Kothary. He asked me to update my creation a little for better work in IE10 (pre release version for that time).

After short conversation he decided to create the next challenge for me and send me Lumia 800.


Imageless Lumia 800

Meet new imageless creation - Lumia 800


Source

All sources available on GitHub - http://github.com/TjRus/Lumia.js


tTable.js - work with tables like a boss
Sep 08, 2013     18:05:47

tTable.js actually begins as a simple FedEx Day project. But from the first lines of code I understand that this will be my next opensource project.

For now it's not ready even for 10%. It's only a little bit coded idea.


A little story

Everything starts with Google Visualization Tables. Few years ago one of my colleague decided that this is the best solution for tables in our web service. At that time maybe that was really great solution, but not now...


tFormer.js updated to v0.5.2
Sep 07, 2013     22:00:00

28.08.2013 01:35 AM - that was the v0.5 finish time.

tFromer.js finaly was updated with great improvements (but it is still in beta).

It was actually rebuilded from scratch: new API, new type af work with form elements, and still on native JavaScript without any dependencies...


tformer.js - empower your HTML forms
Apr 25, 2013     11:11:11

Introduction:

Have you ever tried to develop forms? Or wrote a script for the validation of these forms on the client side? Did you have to use the already existing plugins for form validation?

I had to, but I've never been 100% satisfied with any approach to neither solving the problem directly (own validation script for each project under its forms), nor how the existing third-party plugins works.


The Problem:

The main problems of own scripts and plug-ins have always been - the flexibility, convenience and simplicity.

A large number of data-attributes, required for configuration scripts (as in Parsley.js) makes the code less readable, and never remembers how to write them correctly. Not so simple ...

Not all plugins are well suited for the desired HTML-forms, and constantly write own scripts for different forms are not always convenient and reasonable.


Objective:

Create something flexible, easily configurable, a fully controllable, with an intuitive syntax and the main idea - to validate.


Solution:

The solution resulted in a small opensorce plugin, called tFormer.js.


W3C Conf 2013 stream
Feb 21, 2013     14:41:45

W3Conf is W3C's an­nual confer­ence for web pro­fes­sion­als. If you are a web devel­op­er or designer want­ing to hear the lat­est news on HTML5, CSS, the open web platform and your place in it, come join us!

Watch it


Custom JavaScript Events
Jan 29, 2013     21:57:36

While working on a JavaScript plugin I decided that it is great when plugin informs user about what it have done or on what it is working right now. This functianality is the same as some events in javascript like 'click', 'keyup' or others. And the plugin should use it's own events.

But how to fire own crossbrowser event?

Red more to see details.


Open foreign domain links in a new window
Sep 14, 2012     16:59:45

Few weeks ago I saw a piece of code on my friend's website. Main task of this code - open foreign links in a new page.

$(document).ready(function(){
    $('a').each(function() {
        var a = new RegExp('/' + window.location.host + '/');
        if(!a.test(this.href)) {
            $(this).click(function(event) {
                event.preventDefault();
                event.stopPropagation();
                window.open(this.href, '_blank');
            });
        }
    });
})

Do you think this code is correct? As for me - I don't think so.

I can add few lines to this code to improove it:

  • "/*" before this code;
  • "*/" after this code;

Base64 vs. CSS Sprites: battle for performance
Jul 15, 2012     17:17:17

Tones of developers fighting with unneeded kilobytes of data on their web projects to increase their performance. Minimization of pages weight, reducing the number of requests, place of including scripts and many other things affect the speed of loading and displaying the pages. Developers using css3 sprites to reduce the number of queries when page loads. Base64 image encoding also using in this context and in some way it is more convenient.

... Read more to know the benefits and drawbacks


12