JQuery插件无法正常工作

Kay*_*Kay 3 jquery jquery-plugins

所以我有这个插件http://www.myjqueryplugins.com/jRating 我下载了它并在一个新的空白页面上尝试它,看看我是否可以做到这一点.有效.现在的问题是我把这个插件放在我的网站上并像在空白页面中那样做了精确的事情,但这次插件无效.是因为我在实际网站上使用原始的jquery函数还是什么?不能在线上传我的所有文件..但这里是重要的部分

这是进口

<!-- styles -->
<link rel="stylesheet" type="text/css" href="styles/general.css"/>
<link rel="stylesheet" type="text/css" href="styles/place-event.css"/>
<link rel="stylesheet" type="text/css" href="styles/homepage.css"/>
<link rel="stylesheet" type="text/css" href="styles/css-buttons.css"/>
<link rel="stylesheet" type="text/css" href="styles/colors.css"/>

<!-- plugin jRate -->
<link rel="stylesheet" type="text/css" href="plugin/jrate/jquery/jRating.jquery.css"/>
<script type="text/javascript" src="plugin/jrate/jquery/jRating.jquery.js"></script>

<!-- scripts -->
<script type="text/javascript" src="scripts/removeTextClick.js"></script>
<script type="text/javascript" src="scripts/jquery-1.4.4.min.js"></script>

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=true"></script>
Run Code Online (Sandbox Code Playgroud)

这是jquery代码

<script type="text/javascript">

$(document).ready(function(){

    $("#abso").hide();
    $("#close").hide();


    $("#places-feed").load("eventPictures.html");
    $("#comments").load("commentsOnEvent.html");
    $("#insert-activity").load("newsFeed.html");
    $("#list-friends-feed-link").load("friendsCount.html");
    $("#notify").load("notificationCount.html");
    $("#list-groups-feed-link").load("groupsCount.html");


    $("#list-friends-feed-link").click(function(){ //start click

        $("#abso").load("listFriendsFeed.html");
        $("#abso").slideDown("600", function(){});
        $("#close").slideDown("600", function(){});

    }); //end click

    $("#list-pictures-feed-link").click(function(){ //start click

        $("#abso").load("picFeed.html");

        $("#abso").slideDown("600", function(){});
        $("#close").slideDown("600", function(){});
    }); //end click

    $("#list-groups-feed-link").click(function(){ //start click

        $("#abso").load("listGroupsFeed.html");

        $("#abso").slideDown("600", function(){});
        $("#close").slideDown("600", function(){});
    }); //end click

    $("#notify").click(function(){ //start click

        $("#abso").load("notifications.html");

        $("#abso").slideDown("600", function(){});
        $("#close").slideDown("600", function(){});
    }); //end click

    $("#upload-pic-place-gallery").click(function(){ //start click

        $("#abso").load("uploadPicPlaceGallery.html");

        $("#abso").slideDown("600", function(){});
        $("#close").slideDown("600", function(){});
    }); //end click

    $("#close").click(function(){ //start click

        $("#abso").slideUp("600",function(){});
        $("#close").slideUp("600",function(){});
    }); //end click


    // this block is for jRate plugin

    $(".ratings").jRating();

    // ---



});


</script>
Run Code Online (Sandbox Code Playgroud)

最后这是一些包含插件使用的html中的div的代码

<div id="the-place-event-div"> <!-- the place event div start -->

<div id="for-top-box"> <!-- for top box start -->
<a>
<img src="images/welcome.png"/>
</a>

<div id="place-description"><p>where awesomeness meets awesome</p> <!-- place description start -->
<p id="date-time">Date:<a>21/08/2010</a> Time:<a>07:00am</a></p>

<div class="ratings" data="12_1"> <!--rating div start -->



</div> <!-- ratings div end -->



 </div> <!-- place description end -->



</div> <!-- for top box end -->
Run Code Online (Sandbox Code Playgroud)

rah*_*hul 10

问题是你在引用jQuery文件之前添加了对插件的引用.

<script type="text/javascript" src="scripts/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="plugin/jrate/jquery/jRating.jquery.js"></script>
Run Code Online (Sandbox Code Playgroud)

这应该工作.