Skip to content

Instantly share code, notes, and snippets.

View galaakk's full-sized avatar

Eric Dejonckheere galaakk

View GitHub Profile
@galaakk
galaakk / gist:3679217
Created September 8, 2012 19:57
jQuery : Simple fade-out
$(function() {
$('#identifiant a').click(function(){
$('#identifiant').fadeOut(1000);
});
});
@galaakk
galaakk / gist:3679211
Created September 8, 2012 19:57
jQuery : Scroll to anchor
$(document).ready(function() {
// Click event for any anchor tag that's href starts with #
$('a[href^="#"]').click(function(event) {
// The id of the section we want to go to.
var id = $(this).attr("href");
// An offset to push the content down from the top.
var offset = 60;
@galaakk
galaakk / gist:3679205
Created September 8, 2012 19:56
CSS : Text columns
#content {
-webkit-column-count: 2;
-webkit-column-rule: 1px solid #bbb;
-webkit-column-gap: 2em;
-moz-column-count: 2;
-moz-column-rule: 1px solid #bbb;
-moz-column-gap: 2em;
column-count: 2;
@galaakk
galaakk / gist:3679192
Created September 8, 2012 19:54
CSS : Simple image fullscreen
body {
background: url(image.jpg) no-repeat;
background-size: 100%;
}
@galaakk
galaakk / gist:3679185
Created September 8, 2012 19:54
CSS : Blurry text
.blur {
color: rgba(0, 0, 0, 0);
text-shadow: 0 0 5px rgba(0,0,0,0.5);
}
@galaakk
galaakk / gist:3679179
Created September 8, 2012 19:53
CSS : Auto break word
-moz-hyphens:auto;
-ms-hyphens:auto;
-webkit-hyphens:auto;
hyphens:auto;
word-wrap:break-word;
@galaakk
galaakk / gist:3679163
Created September 8, 2012 19:52
CSS : Absolute center an image
img {
position: absolute;
top: 50%;
left: 50%;
width: 500px;
height: 500px;
margin-top: -250px; /* Half the height */
margin-left: -250px; /* Half the width */
}