The HTML that you indicated in your question does not contain the most relevant information: a slide container. In addition, we do not know which slider you are trying to use, since it is not taken into account in the question. I suggest you provide all the necessary information by asking a question so that people can understand what is happening around.
However, I managed to find a working example in this tutorial that works like the one you partially provided and summarizes each step.
First, make sure all scripts are included in the page:
<link rel="stylesheet" href="flexslider.css" type="text/css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> <script src="jquery.flexslider.js"></script>
Then, to make the slider work, you obviously need an accessible container to work with. Say this is .slides_container :
<div class="slides_container"> <ul class="slides"> <li> <img src="slide1.jpg" /> </li> <li> <img src="slide2.jpg" /> </li> <li> <img src="slide3.jpg" /> </li> </ul> </div>
Finally, the slider should be activated as follows (in the header):
$(window).load(function() { $('.slides_container').flexslider(); });
As a tip, I suggest you make sure that this basic example works flawlessly before adding any complexity to it. When this works, try using the simplest selector you can think of (i.e. the #temp element #temp that it most likely works as intended without any debugging capability). The final case should be written only when you know that all functions work.
Hope this helps :-)
source share