Skip to content

Instantly share code, notes, and snippets.

Avatar

Zine-el Abdine Radoua zearadoua

View GitHub Profile
@zearadoua
zearadoua / scss
Created Sep 25, 2017
bootstrap mixin for rtl
View scss
@mixin rtl() {
html[dir=rtl] & {
@content;
}
}
// float element right in rtl
@mixin float-columns-right($class, $i: 1, $list: ".col-#{$class}-#{$i}") {
@for $i from (1 + 1) through $grid-columns {
$list: "#{$list}, .col-#{$class}-#{$i}";
@zearadoua
zearadoua / got-top.js
Last active Oct 18, 2017
button go-top always stay o top of footer
View got-top.js
// Button go Top
$(window).on('scroll' ,function (event) {
var el = $(".region-footer");
var elTop = el.offset().top;
var windowTop = $(window).scrollTop();
var windowHeight = $(window).height();
var windowBottom = windowTop + windowHeight;
var elVisible = windowBottom - elTop;