k4kuz0
k4kuz0

Reputation: 1045

Why does JCarousel fail to appear?

I have followed the instructions here:

jCarousel link

And it does not appear (only the CSS is working, it appears the actual function is not).

This is my HTML Head:

<head>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/scripts.js"></script>
<script type="text/javascript" src="js/jquery.jcarousel.min.js"></script>

<title>Sites</title>
<script>
$(function() {
    $('.jcarousel').jcarousel({
        // Configuration goes here
    });
});    
</script>

</head>

This is the actual part where I wanted the Carousel:

    <div class="jcarousel">
        <ul>
            <li><img src="Images/prio_site2.png" width="600" height="400" alt=""></li>
            <li><img src="Images/prio_site_mouseover.PNG" width="600" height="400" alt=""></li>
        </ul>
    </div>

Also, the CSS considered Necessary is in the CSS file. Any idea what's going on? The carousel is completely not appearing.

Upvotes: 0

Views: 74

Answers (1)

Bobby5193
Bobby5193

Reputation: 1625

$(document).ready(function() {
        $('.jcarousel').jcarousel();
    }); 

Have you tried calling the function without the brackets ?

I've also made a working fiddle here : http://jsfiddle.net/bobby5193/2J4yk/

The brackets might not be a problem, but the css properties should be checked for the next/prev buttons. Also you can check with Dev tools in chrome and see if you have missing css properties or js errors.

Upvotes: 1

Related Questions