PHP banner with Flexslider

Asked

Viewed 270 times

1

I am creating in PHP a banner display with the use of Flexslider. But when I load the example page I’m testing, nothing shows up. What could be wrong? The php file, images and flexslider.css, jquery.flexslider.js and jquery.flexslider-min.js files are all in the same folder.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Documento sem título</title>
<link rel="stylesheet" href="flexslider.css" type="text/css">
<script type="text/javascript" src="jquery.flexslider.js"></script>
<script type="text/javascript" src="jquery.flexslider-min.js"></script>
<script type="text/javascript" charset="utf-8">
  $(window).load(function() {
    $('.flexslider').flexslider({
        controlsContainer: '.flex-container'
    });
  });
</script>

</head>
<body>
<div class="flex-container">
<div class="flexslider">

  <ul class="slides">
    <li>
      <img src="Imagem1.jpg" />
    </li>
    <li>
      <img src="Imagem2.jpg" />
    </li>
    <li>
      <img src="Imagem3.jpg" />
    </li>
  </ul>
</div>
</div>
</body>
</html>
  • 1

    Only jquery was missing,

  • <script src="//code.jquery.com/jquery-latest.min.js" type="text/javascript"></script> that must come first of all.

  • It worked, thanks! However, the banner is in full screen, how can I set a smaller size and position it? And is it possible to include a link to each image? So, when clicked, a new page opens.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.