This repository has been archived on 2024-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
usergalaxy/script.js

45 lines
1.3 KiB
JavaScript

jQuery(function($){
function circles() {
$(".circle-1").height($(".circle-1").width());
$(".small-circle").height($(".small-circle").width());
$(".circle-2").height($(".circle-2").width());
$(".circle-3").height($(".circle-3").width());
$(".circle-4").height($(".circle-4").width());
$(".humans").height($(".humans").width());
$(".humans img").height($(".humans img").width());
$(".avatars").height($(".avatars").width());
}
circles();
$(window).on("resize",function(){
circles();
});
var speed = 50;
var radius = 500;
var border_color="#cacbce";
var img_border_color="#cacbce";
$(".circles").css("border-color",border_color);
$(".avatars,.humans").css({
"animation-duration":speed+"s",
"-webkit-animation-duration":speed+"s"
});
$(".small-circle").each(function(){
$(this).css("border-color",$(this).data('color'));
});
$(".humans").hover(function(){
$(this).find("img").css({
"border":"5px double "+img_border_color
});
$(this).find("div").css({
"padding":"10%",
"display":"block"
});
},
function(){
$(this).find("img").css({
"border":"1px solid "+img_border_color
});
$(this).find("div").css("display","none");
}
);
});