0

I wanted to use jquery-ui plugin after I've used the fancybox plugins. But when I try to link the external javascript files of the jquery-ui, a conflict is occured between the plugins. I tried to find a general solution to this problem but all I found is some specific solutions for different plugins.

I guess that something is bad with my links:

In the masterpage:

<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script>
<script type="text/javascript" src="/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
<script type="text/javascript" src="/fancybox/jquery.easing-1.4.pack.js"></script>
<script type="text/javascript" src="/fancybox/jquery.mousewheel-3.0.4.pack.js"></script>

<script type="text/javascript" src="/jqueryui/scripts/jquery-ui.js"></script>
<script type="text/javascript" src="/jqueryui/scripts/jquery.js"></script>

The last two links cause to this problem, or even one of them.

Here is what happens when I try to run it ,there are two error messages which appear:

Unable to get property 'init' of undefined or null reference.

and immediately afterwards:

Object doesn't support property or method 'fancybox'.

Thanks :)

Quaion
  • 23
  • 9
  • you are including three jquery versions...just include only one. – Kartikeya Khosla Sep 28 '14 at 11:22
  • which one should I use? – Quaion Sep 28 '14 at 11:27
  • @Quaion : just include before any other js file `` and delete the rest of them. Why v1.8.3? because you are using fancybox v1.3.4 and that version doesn't work with jQuery 1.9+. Check for reference http://stackoverflow.com/q/14344289/1055987 – JFK Sep 29 '14 at 02:05

1 Answers1

0

Include latest version of jquery and after that include jquery ui then fancybox. Rather you can use popup from jquery ui itself, no need to use fancybox

Bhupender Keswani
  • 1,218
  • 1
  • 9
  • 16