Javascript 未捕获类型错误:对象#<;MouseEvent>;含铬

Javascript 未捕获类型错误:对象#<;MouseEvent>;含铬,javascript,mootools,joomla1.5,Javascript,Mootools,Joomla1.5,我在joomla网站上工作,在ff和IE上有一个mootools幻灯片,但在chrome上没有 chrome错误: 未捕获类型错误:对象#在第57行没有方法“停止” mootools代码 window.addEvent('domready',function() { 2 /* settings */ 3 var showDuration = 6000; 4 var container = $('slideshow-container'); 5 var images = container.get

我在joomla网站上工作,在ff和IE上有一个mootools幻灯片,但在chrome上没有

chrome错误:

未捕获类型错误:对象#在第57行没有方法“停止”

mootools代码

window.addEvent('domready',function() {
2 /* settings */
3 var showDuration = 6000;
4 var container = $('slideshow-container');
5 var images = container.getElements('.slide');
6 var captions = container.getElements('.slide .text');
7 var thumbs = container.getElements('.thumbs img');
8 var currentIndex = 0;
9 var interval;
10 //var fade = new Fx.Fade();
11 /* opacity and fade */
12 //alert(thumbs);
13 images.each(function(img,i){
14
15
16 //alert(i);
17 if(i > 0) {
18
19 img.setStyle('opacity',0);
20
21 }
22 });
23 /* worker */
24 var show = function(to) {
25 captions[currentIndex].setStyle('opacity',0);
26 thumbs[currentIndex].removeClass('active');
27 fadeout(images[currentIndex]);
28
29
30
31 fadein(images[currentIndex = ($defined(to) ? to : (currentIndex < images.length - 1 ? currentIndex+1 : 0))]);
32 thumbs[currentIndex].addClass('active');
33 captions[currentIndex].setStyle('opacity',1);
34
35
36
37 };
38 /* start once the page is finished loading */
39 window.addEvent('load',function(){
40 show(0); start();
41 });
42
43 function fadein(el){
44 el.fx = el.effect('opacity',{duration: 2000}).start(1);
45 //el.setStyle('opacity',1);
46 }
47 function fadeout(el){
48 el.fx = el.effect('opacity',{duration: 2000}).start(0);
49 }
50
51 var stop = function() { $clear(interval); };
52 var start = function() { interval = show.periodical(showDuration); };
53 //alert(thumbs);
54 thumbs.each(function(thumb,i){
55 //if(currentIndex == i) thumb.set('class','active');
56 thumb.addEvent('click',function(e){
**57 if(e) e.stop();**
58 stop();
59 show(i);
60 start();
61
62
63 });
64 //alert( thumb.get('src') + ' ' + i);
65 });
66 /* function for thumbs */
67 var showSlide = function(index) {
68 fadein(images[index]);
69 //show();
70 };
71}); 
window.addEvent('domready',function(){
2/*设置*/
3.持续时间=6000;
4变量容器=$('slideshow-container');
5 var images=container.getElements('.slide');
6 var captions=container.getElements('.slide.text');
7 var thumbs=container.getElements('.thumbs img');
8 var currentIndex=0;
9 var区间;
10//var fade=new Fx.fade();
11/*不透明度和褪色*/
12//警报(拇指);
13个图像。每个(功能(img,i){
14
15
16//警报(i);
17如果(i>0){
18
19图像设置样式(“不透明度”,0);
20
21 }
22 });
23/*工人*/
24 var显示=功能(至){
25标题[currentIndex].setStyle('opacity',0);
26拇指[currentIndex].removeClass('active');
27衰减(图像[currentIndex]);
28
29
30
31 fadein(images[currentIndex=($defined(to)→to:(currentIndex
顺便说一句,它在本地运行良好


感谢大家对mootools 1.1x及其
新事件(e).stop()
提供的帮助,但您仍需要检查它是否有此方法。因此
if(e&&e.stop)新事件(e.stop()
。你应该升级

顺便说一句,只有在执行
fireEvent(“单击”)