'Blog' Category

  • Binding Events The Right Way

    March 19, 2012

    On of the interesting new things that Javascript 1.8.5 introduced is something that we were doing for long time – binding functions to events while controlling the context of called method. If up until now we used tricks like closures to create this binding, now this is built into the language. Binding Events This is [...]

  • Loading Scripts – Sync or Async

    March 12, 2012

    In many programming languages we have the concept of including files/scripts in a project. This means that the compiler or the interpreter needs to fetch and read another file. This is one of the building blocks of modern programming. In JavaScript we don’t have an actual include but we can add scripts to the DOM [...]

  • Comparing Javascript Objects

    March 10, 2012

    If you ever had the need to compare two javascript object you know that this is not an easy task. Javascript compare objects by reference, so only if it is the same object the javascript compare will return true. The Problem The simple solution to compare two object is to iterate on the properties and [...]

  • BabaJS – Javascript Template Engine

    April 26, 2011

    What is BabaJS BabaJS is an open source Javascript template engine/manager. Read the full and updated documentation at github The basic concept is: Template + Data = HTML Here is a simple example: <!– user template –> <div class="user"> <span>< %=data.userName%></span> < %IF data.hasPic %> <img src="<% return 'http://imgs.mydomain.com/'+ data.userPic; %/>" /> < %ELSE%> <span>Add [...]

  • Implementing Autocomplete jQuery Plugin for Textarea

    March 7, 2011

    We all know the auto-complete feature. We use it in google search, when google tries to suggest our search term, and you probably saw it in many other sites which implemented the auto-complete for their own use. Most of the auto-complete out there are implemented in a text field, where the user has one line [...]

 
Powered by Wordpress and MySQL. Theme by openark.org