为什么一个jsfiddle可以工作而另一个jsfiddle却不能工作,即使它们具有完全相同的代码? [英] Why does one jsfiddle work and the other does not, even though they have the exact same code?

查看:81
本文介绍了为什么一个jsfiddle可以工作而另一个jsfiddle却不能工作,即使它们具有完全相同的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个地图,该地图的每个小节都在悬停时突出显示.研究后告诉我的最好方法是使用明显起作用的imagemapster,因此是第一个功能链接...但是在第二个中,完全相同的代码却没有.我想念什么吗?如果有人知道会有所帮助

I'm trying to create a map in which each of its subsections highlight on hover. The best method I was told after researching was to use imagemapster which apparently functions, hence the first functional link... but in the second with the exact same code it doesn't. Am I missing something? If anyone knows it would be helpful

此方法有效

而这个

我正在使用imagemapster. 我想要的是这个 .... gif

I'm using imagemapster. What I want is this .... gif

var image = $('#vegetables');



image.mapster({
     fillColor: "0000"
 });

图像的位置不好.抱歉,只需要向下滚动一点和向右滚动一点即可.

the positioning of the image is bad. I apologize, it's just needed to scroll down a bit and to the right a bit.

推荐答案

查看JS代码正上方的菜单.

Look at the menu immediately above the JS code.

一个包含jQuery(一种公认的具有安全问题的古老版本),而另一个则没有.

One includes jQuery (an admittedly ancient version with security problems) and one doesn't.

JS依赖于jQuery,因此在不可用时抛出错误(打开开发人员工具,查看控制台,阅读错误消息!).

The JS depends on jQuery so throws an error (open the developer tools, look at the console, read the error messages!) when it isn't available.

这篇关于为什么一个jsfiddle可以工作而另一个jsfiddle却不能工作,即使它们具有完全相同的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆