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


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;


Stop all active ajax requests
May 31, 2012     07:18:03

Several months ago I encountered a problem - "How to abort() all current requests on the project page?". If you have a project built on AJAX you'll definitely need this functionality. Moreover, if your project is not built entirely on AJAX, but uses it in some cases to accelerate the navigation on the project you would not have prevented the use of abort() for such requests.

In a single use of AJAX it is simple. The XMLHttpRequest has a abort method, which cancels the request.

// creating our request
xhr = $.ajax({
	url: 'ajax/progress.ftl',
	success: function(data) {
		//do something
	}
});

// aborting the request
xhr.abort();

But what if we have a lot of requests and we wand to abort all of them?


How I made an iPhone 4 in CSS3
Jan 26, 2012     16:30:00

In 19th December 2011 I published my creation, iPhone4 in CSS3, to my website. Since that time more then 400 000 unique visitors saw it, many of them like and share it. And now i want to tell how I made it from the stage of beginning to the first tweet about it's finished.

Click "Read more" to find out how I made it.