jQuery Nailthumb not working

时间:2016-07-11 21:47:14

标签: jquery thumbnails

This is the code:

[https://jsfiddle.net/r7bfY/96/][1]

I don't know why, but the picture is not getting nailthumbed.

Please help.

1 个答案:

答案 0 :(得分:0)

  1. You didn't close the javascript part
  2. You didn't include the nailthumb javascript file.

    $(function() {
        $('.nailthumb-container').nailthumb();
    });
.square-thumb {
  width:100px;
  height:100px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/jquery.nailthumb/1.1/jquery.nailthumb.min.js"></script>
This is original picture:
<br>
<img src="http://www.garralab.com/img/small/avatar.png" />
<br>
<br>
This should be updated, but looks same:
<br>
<div class="nailthumb-container square-thumb">
        <img src="http://www.garralab.com/img/small/avatar.png" />
</div>