Today's Question:  What does your personal desk look like?        GIVE A SHOUT

SEARCH KEYWORD -- event delegation



  JavaScript efficiency catch up

JavaScript is a very flexible language, we can write JavaScript code freely with various styles, different kinds of codes will have different execution efficiency. Here we summarize some tips we get from our development. Efficiency of JavaScript itself JavaScript has execution context chain, closures, prototype inheritance, eval etc. It brings us some magic features, but it also introduces the performance issue, if we don't use them properly, it will affect the codes execution efficiency. 1. Glo...

   JavaScript,efficiency,event delegation,eval     2013-04-02 04:08:46

  Best practices of front end optimization

1. Use DocumentFragment or innerHTML to replace complex elements insertion DOM operation on browser is expensive. Although browser performance is improved much, multiple DOM elements insertion is still expensive and will affect the page load speed. Assume we have an ul element on our page, we now want to retrieve a JSON list using AJAX and then update the ul using JavaScript. Usually we may write it as : var list = document.querySelector('ul'); ajaxResult.items.forEach(function(item) { // ...

   JavaScript,Front end,Optimization,Tips     2013-07-06 11:26:27

  Building an iPhone application.

One of my New Years resolutions was to finally learn the iOS SDK and build a 'real' application.I am happy to report that progress is going really well and wanted to share something that I have noticed about iOS programming.It only looks scary... it's not. It's actually very easy.Now, I am not building Mail, Angry Birds or Photosynth or anything, but the core concepts of the SDK are not that bad once you spend some time learning delegation. If you don't understand delegation, iOS programmi...

   Apple,iOS,Application development     2012-01-28 07:03:36

  How to use Chome dev tool to find event handler bound to an element

As a front end developer, there is frequent need to debug JS code and sometimes need to find out what event handler has been bound to a HTML element. In this post, we will show how to find out the click event handler bound to a HTML element, this same applies to other events as well. Nowadays, a web application is usually very complicated and there are lots of JS codes which makes it difficult to find out what click event handler has been bound to a HTML element, especially when the JS source co...

   JAVASCRIPT,CHROME,CHROME DEV TOOL,EVENT LISTENER     2019-08-17 22:14:36

  Microsoft to launch Surface Pro 4 on October 6

Microsoft Microsoft has just updated on their website about an event to be held on October 6. This event will be held in New York at October 6 10am EDT.  As described by Microsoft : "We have some exciting news to share about Windows 10 devices". Although there are no details about what these Windows 10 devices are, many think this is the time when new Lumia Phones and Surface Pro 4 will be launched.  The Lumia devices will be Lumia 950 and Lumia 950XL. Both of them will be shipped wit...

   SURFACE PRO 4,MICROSOFT,WINDOWS 10,LUMIA     2015-09-15 07:31:56

  Advanced event registration models

On this page I explain the two advanced event registration models: W3C’s and Microsoft’s. Since neither is cross–browser supported, their use is, for the moment, deprecated. W3C and Microsoft have both developed their own event registration model to replace Netscape’s traditional model. Though I’m not impressed by the Microsoft model, W3C’s is very good, except for one crucial vagueness. Unfortunately few browsers support it at the moment. W3C W3Câ...

   JavaScript,Event model,this,bubble,capturing     2011-12-27 09:20:44

  Prototypes and Object Orientation

David Chisnall takes a look at the two dominant paradigms in object-oriented languages (classes and prototypes) and discusses the strengths and weaknesses of each.Two terms are quite often confused when describing programming languages:class-based and object-oriented:Simula was the first class-based language. It provided classes (actually implemented using closures) as a means of encapsulating abstract data types.Smalltalk was the first object-oriented language. It provided a...

   Prototype,OOP,Differential,Comparison,Mo     2011-09-02 11:51:26

  Ensure triggering transitionend event in JavaScript

CSS3 Transition has been widely used in modern web app development to offer users animations. Traditionally animations of element in HTML are controlled by JavaScript. If fancy animation is desired, then third party plugins can be installed in browsers such as Flash, Silverlight, Java Applet etc. With CSS3, animations can be easily achieved like a charm. Transition is one of the many features provided by CSS3. It can be used to transit one element from one state to another state smoothly within ...

   CSS3 TRANSITION, TRANSITIONEND, FORCE FIRE TRANSITIONEND     2015-05-09 08:56:51

  Data from iPhone 5 event

Apple finally unveils iPhone 5 on an event at the Moscone Center in San Francisco. At the beginning of the event, Apple showed us some data. There will be 380 Apple Retail Stores opened across 13 countries Last year Apple Retail Store welcomed 83 million customers 7 million Mountain Lion upgrades since last month It ranked the first place in sales for Macbook Air in United States, it has 27% market share in July From April to July, 17 million iPads are sold 84 million iPads are sold until thi...

   Apple,iPhone 5,event,data     2012-09-12 21:26:03

  The Basics of jQuery

So, a while back I had an internal presentation at work about this topic. A few good friends in the community took a look at my slides, and they thought it would make a nice blog post because “there can’t be too many good posts about jQuery introduction and best-practices.” Whether this post is going to be good or not, is up to you but I’ll try to outline what jQuery is, and how you can start working with it. For most of you, this will just be a re-cap and probably...

   JavaScript,jQuery,Framework,Basic     2012-03-01 04:57:18