Combining Raphael and jQuery to achieve browser compatibility

前端 未结 5 1822
梦谈多话
梦谈多话 2021-01-02 06:52

Having discovered that IE does not handle javascript onmouseout, I\'m determined to use jQuery instead so the cross-browser compatibility would be taken care of

5条回答
  •  时光取名叫无心
    2021-01-02 07:48

    This is a bit of javascript trickery, st is passed in. Look at the JS code in the australia example.

    (function (st, state) {
                        .. some code referring to st[0] in here .. 
                    })(aus[state], state);
    

    So st[0] in this code refers to the path DOM node from aus[state].

    Try it yourself with this simple example in a Firebug console:

    (function(a,b) {alert(a); })("hello", "b");
    

    hth

提交回复
热议问题