我必须尝试使用mootools和joomla 2.5非常简单的东西,但是不行。
当我点击菜单链接
时,我才能显示提醒我只想显示警告,firebug没有重新调整任何错误,但没有显示警告。
window.addEvent('domready', function() {
var opt = {
slides: 'sliders',
duration: 1500,
auto: true,
delay: 5000,
buttons: {next:'go-prev', prev:'go-next'},
transition: Fx.Transitions.Quint.easeOut
}
var scroller = new QScroller('carrusel', opt);
scroller.load();
$$('.item-1 a').addEvent('click', function(event){
alert('clicked!');
});
});
</script>
<ul class="menu">
<li class="item-1">
<a href="/index.php/descripcion">Click here!</a></li>
</ul>
解决方案
window.addEvent('domready', function() {
$$('.item-1 a').addEvent('click', function(event){
alert('clicked!');
});
var opt = {
slides: 'sliders',
duration: 1500,
auto: true,
delay: 5000,
buttons: {next:'go-prev', prev:'go-next'},
transition: Fx.Transitions.Quint.easeOut
}
var scroller = new QScroller('carrusel', opt);
scroller.load();
});
</script>