WordPress
1
Вклад в тег
<div id="projectThumbs">
<div class="wrapper"> <a class="project">
<div class="intrinsic" style=""></div>
</a>
</div>
</div>
.intrinsic {
background-color: #2A3139;
box-shadow: none;
width: 200px;
height:200px
}
var randomLinks = $('#projectThumbs .intrinsic');
var original = randomLinks.css('background-color');
var colors = ['#f9c213', '#f35c4a', '#3da1bf', '#827287'];
randomLinks.hover(function () { //mouseover
var col2 = Math.floor(Math.random() * colors.length);
var newcolor = '' + colors[col2];
$(this).css('background-color', newcolor);
}, function () { //mouseout
$(this).css('background-color', newcolor);
});
<style>.entry{display: none}</style>
<script type="text/javascript">
$(document).ready( function() {
$('.entry').css({display: 'block'});
});</script>