Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/joomla/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用mootools将点击事件添加到Joomla菜单_Joomla_Google Analytics_Mootools - Fatal编程技术网

使用mootools将点击事件添加到Joomla菜单

使用mootools将点击事件添加到Joomla菜单,joomla,google-analytics,mootools,Joomla,Google Analytics,Mootools,我在joomla 1.5网站上工作。我被要求将oclick事件添加到顶级导航中,以便进行谷歌事件跟踪 我看不出在joomla admin中怎么做。我知道在jquery中我可以使用append命令添加它,但不知道如何使用mootools添加它 有人能给我指出正确的方向吗?看看顶层导航中的元素类别,然后你可以做一些非常简单的事情,比如: window.addEvent('domready', function(){ //when the DOM is ready $$('.class-nam

我在joomla 1.5网站上工作。我被要求将oclick事件添加到顶级导航中,以便进行谷歌事件跟踪

我看不出在joomla admin中怎么做。我知道在jquery中我可以使用append命令添加它,但不知道如何使用mootools添加它


有人能给我指出正确的方向吗?

看看顶层导航中的元素类别,然后你可以做一些非常简单的事情,比如:

window.addEvent('domready', function(){ //when the DOM is ready

  $$('.class-name').addEvent('click', function(evt){
    /* your event tracking, knowing that 'this' is the current .class-name element */  
  }); 

});
不客气;)p、 如果您发现答案正确,请投票并将其标记为“已接受”,ty;)