V
V
valackar2015-09-15 00:02:40
Lightbox
valackar, 2015-09-15 00:02:40

Lightbox 2 not working Where is the error?

I'm doing a landing page on bootstrap installed lightbox2 but it doesn't work I registered everything correctly, the paths are spelled out correctly, but it opens the image in a new
head window

<head>
    <meta charset="UTF-8">
    <title></title>
    <!--Подсключение вспомогающие стили-->		
    <link rel="stylesheet" href="css/bootstrap-theme.min.css">
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/font-awesome.min.css">
    <link rel="stylesheet" href="css/animate.css">
    <link rel="stylesheet" href="css/lightbox.css">
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400,800,700,600&subset=latin,cyrillic' rel='stylesheet' type='text/css'>
    <!--Подсключение основной стиль сайта-->
    <link rel="stylesheet" href="css/style.css">
    <!--Подсключение скриптов-->
    
    <script type="text/javascript" src="js/bootstrap.min.js"></script>
    <script type="text/javascript" src="js/lightbox-plus-jquery.min.js"></script>
    <script>jQuery.noConflict();</script>

    

  </head>

Image code
<div class="row">
          <div class="col-xs-3">
            <a href="upload/images/2.jpg" data-lightbox="roadtrip">
              <img src="upload/images/2.jpg" alt="...">
            </a>
          </div>
          <div class="col-xs-3">
            
          </div>
          <div class="col-xs-3"></div>
          <div class="col-xs-3"></div>
        </div>

As the developer assures that he has already inserted jquery and lightbox into his js file lightbox-plus-jquery.min.js but tried and additionally include jquery still does not work. Where is the mistake? I also tried to insert the markup from the demo, the same problem

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Ineshin, 2015-09-15
@valackar

1. Why jQuery.noConflict?
2. Move the scripts to the very end of the document, before closing the body tag
3. Open the console (F12 in Windows), are there any errors?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question