Updates from January, 2011 Toggle Comment Threads | Keyboard Shortcuts

  • Pablo 5:14 PM on 16 January 2011 Permalink | Reply  

    IE Sucks 

    Damn! i’m working on a website that uses a lot of DOM manipulation and i’m getting tierd of IE and his lack of support. I will just ignore IE.

    All other browsers do what it suposed to do: Chrome, Safary, Firefox.

    IE is not Web 2.0 Friendly. Idk why people still use that pice of shit.

     
  • Pablo 11:46 AM on 5 January 2011 Permalink | Reply  

    Just a simple class i did at work, i do … 

    Just a simple class i did at work, i do mostly flash so when i code in javascript sometimes i need to add events and code more like i code in as3.

    In case someone find this usefull, just a simple class, needs JQUERY to work.

    // Signal.js
    function Signal( str )
    {
        var listeners = [];
    
        this.dispatch = function()
        {
            for( var i = 0; i<listeners.length; i++ )
            {
                listeners[i].apply( null, arguments );
            }
        }
    
        this.listen = function( callback )
        {
            if( $.inArray( callback, listeners )==-1 )
            {
                listeners.push( callback );
            }
        }
    
        this.remove = function( callback )
        {
            listeners = $.grep( listeners, function(v)
                        {
                            return v != callback;
                        });
        }
    
        this.removeAll = function()
        {
            listeners.length = 0;
        }
    
    }

     

     
c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel