I'm trying to create a tumblr page that basically displays images. The structure is something like this:
<div id="slider">
<ul id="slidercont">
<li class="item">
<div class="caption">CAPTION</div>
<img src="http://static.tumblr.com/...">
</li>
<li class="item">
<div class="caption">CAPTION</div>
<img src="http://static.tumblr.com/...">
</li>
</ul>
</div>
I don't know if this is relevant to my question but just in case, I'm using a jquery plugin called FreeWall to display the list as a grid, with these options:
<script type="text/javascript">
$(function() {
var wall = new freewall("#slidercont");
wall.reset({
selector: '.item',
cellH:190,
cellW:2,
gutterY: 6,
gutterX: 6,
fixSize: 1,
onResize: function() {
wall.fitHeight();
},
});
wall.fitHeight();
$(window).trigger("resize");
});
</script>
I'd like to get the dominant color of every image and apply it to the bottom border of each caption div (which is only visible when you hover over the picture). I tried using a script called Color-Thief but I can't get it to work.
I'm pretty much clueless about jquery and javascript, so I'd really appreciate if anyone could tell me a way to do what I want, if there's any.
Thanks!