Answer the question
In order to leave comments, you need to log in
Unable to connect FancyBox. What am I doing wrong?
Hello! I connect FancyBox to the site, but it does not work. I thought that there was a problem with the north, but after trying with a demo on a PC, the same problem. Namely.
Download and extract all files. There is a demo folder there. Everything works great in it. But it is necessary to put the file on the directory above, so it does not work. Naturally changed the path to the script. More precisely
, there was a path .. /lib/script.js // because it is located outside the demo folder, but next to it in the lib folder and works fine.
Changed to js/fansybox/lib/script.js
And nothing works even though the path is correct. Tried /js/fansybox/lib/script.js same thing.
All connections
[code]
[/code]
Answer the question
In order to leave comments, you need to log in
You can check the correctness of the path by opening the source code of the page (Ctrl + U) and clicking on the desired file, if it opens, then the path is correct ...
Try writing .. /js/fansybox/lib/script.js
Unfortunately, "all connections" is not displayed for you.
I can suggest you look in the browser console for errors. If among them you find errors that the file was not found, then take a closer look at where the browser is trying to get them from. If you do not find any errors, pay attention to how you connect the script to the click event on the element or any other event that you use.
In any case, we will be able to deal with your problem, write in the comments)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question