Mootools评级不显示图形

时间:2012-05-20 08:20:10

标签: javascript mootools

我在handyortung

上实施

mootools评级脚本。 在我添加的HTML中:

<form name="ratingsForm"><br />
    <label>Ihre Bewertung ist uns wichtig<br /></label><br />
    <input type="radio" name="rating" value="0.5" />
    <input type="radio" name="rating" value="1.0" />
    <input type="radio" name="rating" value="1.5" />
    <input type="radio" name="rating" value="2.0" />
    <input type="radio" name="rating" value="2.5" />
    <input type="radio" name="rating" value="3.0" />
    <input type="radio" name="rating" value="3.5" />
    <input type="radio" name="rating" value="4.0" checked="checked" />
    <input type="radio" name="rating" value="4.5" />
    <input type="radio" name="rating" value="5.0" />
    <span id="htmlTip"></span>
</form>

并在标题中添加:

<script type="text/javascript" src="/jquery/moostarrating.js"></script>
<script>

window.addEvent("domready",function() {
    MooStarRatingImages.defaultImageFolder = 'https://github.com/lorenzos/MooStarRating/raw/master/Graphics';

    var simpleRating = new MooStarRating({
        form: 'ratingsForm',
        imageEmpty: 'star_boxed_empty.png', // Different image
        imageFull:  'star_boxed_full.png',  // Different image
        imageHover: 'star_boxed_hover.png', // Different image
        width: 17,                          // One pixel bigger
        tip: 'Rate [VALUE]/[COUNT]',        // Mouse rollover tip
        tipTarget: $('simpleTip')           // Tip element
    });
});

奇怪的是:所有图像都已正确加载,但未显示评级。 没有javascript错误。

0 个答案:

没有答案