Hi, I am trying to absolutely append a floating link to each image in a div called “bob”.
My Code so far:
$(".bob").each(function(){
$( "img" ).wrap( "<div class='img-wrapper'></div>" );
$( ".img-wrapper" ).append( "<a href='#' class='img-button'>+</a>" );
});
I will do this with this style:
.img-wrapper {
position:relative;
display:inline-block;
overflow:hidden;
}
.img-wrapper img {
float:left;
display:block;
}
.img-button {
position:absolute;
bottom:0;
right:0;
background:#5ac2b4;
padding: 10px;
color:#FFF;
text-align:center;
text-decoration:none;
}
.img-button:hover {
background:brown;
}