GDB Events Example

Click the buttons above!

Model Data Structure

(Note: Because model updates are in realtime and the syntax highlighter is processor intensive, rapid input may slow this example. This behavior is not present in the production use of the plugin)
{
    sayHello: function(){
        $(this).text("I've been changed!");

        if($(this).is('.active'))
            $(this).removeClass('active');
        else
            $(this).addClass('active');
    }
}

HTML

JavaScript

var model={
    sayHello:function(){
        $(this).text("I've been changed!");

        if($(this).is('.active'))
            $(this).removeClass('active');
        else
            $(this).addClass('active');
    }
};

GDB({events: model});