There is a animation after click on the marker. Why this works in Opera, but do not work in any other browser? Is it something with rendering engines presto and webkit? I can't solve it myself, please help.
http://turie.eu/02/
(all of the code is in one index.开发者_C百科html file)
When trying with Chromium I get this error:
Uncaught TypeError: Object http://turie.eu/02/clouds.swf has no method 'click'
To simulate a click event you need to do something like this:
function fireEvent(element, event){
if (document.createEventObject){
/* for IE */
return element.fireEvent('on' + event, document.createEventObject());
}else{
/* for other browsers */
var evt = document.createEvent('HTMLEvents');
evt.initEvent(event, true, true);
}
return !element.dispatchEvent(evt);
}
精彩评论