I am trying to connect to the site gallery on jquery, but after loading the page nothing happens. Here are the connection scripts:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script src="jquery.transit.js"></script> <script src="jquery.slideshowify.min.js"></script> 

Here is the launch of the script:

 <script>$('img').slideshowify();</script> 

Testing the site locally. When testing the code through http://plnkr.co/ everything works. What could be the problem? Here is the entire html code:

 <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <!--[if lt IE 9]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <title></title> <meta name="keywords" content="" /> <meta name="description" content="" /> <link href="css/style_main.css" rel="stylesheet"/> <link href="css/style.css" type="text/css" rel="stylesheet" media="screen"/> <!-- Подключение js и слайд шоу --> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> <script src="jquery.transit.js"></script> <script src="jquery.slideshowify.min.js"></script> <!-- Подключение js и слайд шоу --> </head> <body> <div class="wrapper"> <header class="header"> <a href="#"> <div id="logo"></div> </a> <?php include_once 'menu.html';?> </header><!-- .header--> <main class="content"> <?php switch($_GET['menu']) { case 'main': include_once("main.php"); break; case 'contacts': include_once("contacts.php"); break; case 'portfolio': include_once("portfolio.php"); break; case 'service': include_once("sservice.php"); break; case 'digest': include_once("digest.php"); break; case 'about_us': include_once("about_us.php"); break; default: include_once("main.php"); break; } ?> <div id="imgContainer"> <img src="http://farm8.staticflickr.com/7207/6917838169_dcf0e2fdd4_o.jpg"/> <img src="http://img.gallerama.com/users/alekbiotic/5484_9.eifel_tower_1.JPG"/> <img src="http://img.gallerama.com/users/libbytish/25966_9.Roll4009.jpg"/> <img src="http://img.gallerama.com/users/alekbiotic/55975_9.DSC_3208.jpg"> </div> <script>$('img').slideshowify();</script> </main><!-- .content --> </div><!-- .wrapper --> <footer class="footer"> </footer><!-- .footer --> </body> </html> 

The same code, only through a sandbox: an example

Closed due to the fact that off-topic participants aleksandr barakin , Grundy , Streletz , Dmitriy Simushev , D-side 23 May '16 at 12:29 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reasons:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - aleksandr barakin, Grundy, D-side
  • “Questions asking for help with debugging (“ why does this code not work? ”) Should include the desired behavior, a specific problem or error, and a minimum code for playing it right in the question . Questions without an explicit description of the problem are useless for other visitors. See How to create minimal, self-sufficient and reproducible example . " - Streletz, Dmitriy Simushev
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • Is there anything in the console? - Aleks G
  • and so? <script> $(function () { $('img').slideshowify() }); </script> <script> $(function () { $('img').slideshowify() }); </script> - Vasily Barbashev
  • Yes, it displays the following error in the console: TypeError: $(...).slideshowify is not a function - Vadim
  • Try downloading jQuery in your project folder. Possible problems with access to the external library - lexxl
  • I tried to download, the result is the same - Vadim

2 answers 2

Understood, the problem was that in one of the included files jquery of another version was already connected, and there was a conflict.

    Based on the error

    TypeError: $(...).slideshowify is not a function

    obviously your slideshowify plugin is not loaded. Make sure that there is this in the html code:

     <script src="jquery.js"></script> <script src="jquery.transit.min.js"></script> <script src="jquery.slideshowify.js"></script> 

    (of course, with the necessary directories, versions, etc.). If there is, then make sure that you do not get 404 on the last of these files.

    Carefully read the Usage section on the slideshowify site .

    • I checked through the console, these files do not issue 404 when loading - Vadim
    • Try to just open jquery.slideshowify.js in the browser - with directories like in this tag - make sure that it opens and contains the correct info. - Aleks G
    • I tried, the files open as expected - Vadim