Inserting jQuery code into HTML

I have a pretty simple question. I'm trying to insert this infinite carousel jQuery script into my HTML file: http://www.catchmyfame.com/catchmyfame-jquery-plugins/jquery-infinite-carousel-plugin/

I can't seem to figure out how to get it in there though. No matter what I've tried, the script yields no result. Can anyone help? I've never used jQuery before. Here is my code (it has a master page):

<%@ Page Title="" Language="C#" MasterPageFile="~/advisor.master" %>

<script runat="server">

</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="js/infinitecarousel/jquery.infinitecarousel3.js"></script>      
<script type="text/javascript">
    $(function () {
        $('#carousel').infiniteCarousel();
    });

</script>   

    <style>        
    </style>


    <div id="carousel"></div>
    <ul>
    <li><img alt="" class="auto-style1" src="image1.jpg" /></li>
    <li><img alt="" class="auto-style1" src="image2.jpg" /></li>
    <li><img alt="" class="auto-style1" src="image3.jpg" /></li>
   </ul>

</asp:Content>

Answers


The only error I can see in your code is that you initialize the carousel on an empty div <div id="carousel"></div>.

Try this instead:

<!--<div id="carousel"></div> -->
<ul id="carousel">
    <li><img alt="" class="auto-style1" src="image1.jpg" /></li>
    <li><img alt="" class="auto-style1" src="image2.jpg" /></li>
    <li><img alt="" class="auto-style1" src="image3.jpg" /></li>
</ul>

Apart from that, if you implemented the plugin and jQuery correctly, and it looks like you did, and placed the files of the plugin where they're supposed to be, I can't see any reason why it shouldn't work.


Need Your Help

Using an iPad as the networked Mac for Xamarin.iOS for Visual Studio

c# ios ipad visual-studio-2012 xamarin

This guide explains how to use Xamarin.iOS for Visual Studio and a network available Mac as the host for Apple's complier:

Simulate/Toggle CAPS LOCK programatically in OS X

objective-c c xcode macos cgeventtap

I have seen many post on this topic. But haven't found a clear answer anywhere.