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
<script> $(function () { $('img').slideshowify() }); </script><script> $(function () { $('img').slideshowify() }); </script>- Vasily BarbashevTypeError: $(...).slideshowify is not a function- Vadim