Skip to content

Instantly share code, notes, and snippets.

Working from home

Rian Ariona ariona

Working from home
View GitHub Profile
ariona / script.js
Created Nov 16, 2015
CSS show/hide animation
View script.js
// User HoverIntent
$(".dropdown-menu .menu-item-has-children").hoverIntent(
var isMega = $(this).hasClass("mega-menu");
var sub = $(this).find("> .sub-menu");
if( isMega ){
} else {
ariona / pxtoem-function.scss
Created Nov 20, 2015
Pixel to Em function for SASS
View pxtoem-function.scss
$browser-context: 16;
@function em($pixels, $context: $browser-context) {
@if (unitless($pixels)) {
$pixels: $pixels * 1px;
@if (unitless($context)) {
$context: $context * 1px;
ariona / proportional-scale.js
Created Nov 25, 2015
Proportionally Scale Any HTML Content
View proportional-scale.js
var $el = $("#very-specific-design");
var elHeight = $el.outerHeight();
var elWidth = $el.outerWidth();
var $wrapper = $("#scaleable-wrapper");
resize: doResize
ariona / input-placeholder.css
Last active Dec 4, 2015
Styling the input placeholder
View input-placeholder.css
* If you want to style specific Input, prepend the input selector like:
* .control::-webkit-input-placeholder{ ... }
::-webkit-input-placeholder {
color: red;
ariona / background-video.css
Created Dec 4, 2015
Minimal CSS to create background video
View background-video.css
* This method can be applied to video tag and
* can be applied to iframe video like youtube, but with some issue to be considered
/* Centering the video */
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
ariona /
Last active Dec 7, 2015
Dynamic Menubar Height with Flexbox

#Dynamic Menubar Height with flexbox

ariona / _Add custom option for
Last active Jan 25, 2016
Add Custom Options for Widgets
View _Add custom option for

##Add Custom Options for WordPress Widgets This snippet will add some option to all registered widget in wordpress.


WordPress Admin Ajax Request Handle Function

This gist show you how to create a function for handling ajax request.

ariona /
Created Apr 8, 2016
Simulate Click Outside Element

Simple plugin for detecting click outside element