简体   繁体   中英

Script didn't work on Firefox, 0 reaction on hover

I have a script that working perfectly on Chrome, but in Firefox there is no action after hovering linked object.

I tried to divide the script.js file for separate documents, but It won't help at all.

Here is the whole effect:

https://jsfiddle.net/lszewczyk45/9unawydo/9/

$(document).ready(function () {
const effect = new Effects('hover-effects');
effect.addEffect(document.querySelector('#cityEffect'), 'city', [ONMOUSEOVER]);
});

I think the problem is in calling the script - the lines at the end of the file, I pasted it above.

This is what FireFox says about your Javascript code:

这是火狐所说的

我解决了,粘贴到https://babeljs.io/ ,编译修改js代码。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM