Skip to forum content

Mif

— mystic javascript interface

You are not logged in. Please login or register.


Post new reply

Post new reply

Compose and post your new reply

You may use: BBCode Images Smilies

All fields labelled (Required) must be completed before the form is submitted.

Required information for guests



Captcha image. Turn pictures on to see it.
Required information
Optional post settings

Topic review (newest first)

1

demo, archive

tree = new Mif.Tree({
    initialize: function(){
        function myFun(event){
            var node=this.mouse.node;
            /*var target=this.mouse.target;
            if(!['icon','name'].contains(target)) return;*/
            if(!node) return;
            alert('node ' + node.name + ' clicked');
        }
        this.wrapper.addEvent('click', myFun.bind(this));
    },
...

2

Hi,

How do I assign my own onclick function to a node?

Thanks