Skip to content

Instantly share code, notes, and snippets.

@almazka987
almazka987 / reset-font-awesome-to-5.css
Created August 3, 2019 04:03
Reset css file helper to upgrade font awesome from 4 to 5, reboot font awesome from 4 to 5 css file
.fa-500px, .fa-adn, .fa-amazon, .fa-android, .fa-angellist, .fa-apple, .fa-bandcamp, .fa-behance, .fa-behance-square, .fa-bitbucket, .fa-bitbucket-square, .fa-bitcoin, .fa-black-tie, .fa-bluetooth, .fa-bluetooth-b, .fa-btc, .fa-buysellads, .fa-cc-amex, .fa-cc-diners-club, .fa-cc-discover, .fa-cc-jcb, .fa-cc-mastercard, .fa-cc-paypal, .fa-cc-stripe, .fa-cc-visa, .fa-chrome, .fa-codepen, .fa-codiepie, .fa-connectdevelop, .fa-contao, .fa-creative-commons, .fa-css3, .fa-dashcube, .fa-delicious, .fa-deviantart, .fa-digg, .fa-dribbble, .fa-dropbox, .fa-drupal, .fa-edge, .fa-eercast, .fa-empire, .fa-envira, .fa-etsy, .fa-expeditedssl, .fa-fa, .fa-facebook, .fa-facebook-f, .fa-facebook-official, .fa-facebook-square, .fa-firefox, .fa-first-order, .fa-flickr, .fa-font-awesome, .fa-fonticons, .fa-fort-awesome, .fa-forumbee, .fa-foursquare, .fa-free-code-camp, .fa-ge, .fa-get-pocket, .fa-gg, .fa-gg-circle, .fa-git, .fa-git-square, .fa-github, .fa-github-alt, .fa-github-square, .fa-gitlab, .fa-gittip, .fa-glide, .fa-glide

Equal Height Columns with responsive

Equal Height function applies if screen width more than 757px

scripts.js:

// Equal Height Columns
function setEqualHeight(columns) {
    var tallestcolumn = 0;
 columns.each(
@almazka987
almazka987 / jquery-scroll-top-button.md
Last active July 30, 2019 09:11
jQuery Scroll Back To Top Button Arrow

jQuery Scroll Back To Top Button Arrow

html:

<div id="alio_to_top"><a href="#"></a></div>

css:

#alio_to_top a {
@almazka987
almazka987 / mobile-detect-php.md
Created July 23, 2019 16:05
Mobile detect php get mobile and tablet classes for <body> including iPad detection

Use mobile detect php library in my WordPress projects

In functions.php:

require_once( get_stylesheet_directory() . '/lib/Mobile_Detect.php' );

In header.php:

php
@almazka987
almazka987 / js-hamburger-button-menu.md
Last active July 24, 2019 02:14
JS code for open and close menu on click on burger button for mobile version of the menu, use with Tasty CSS-animated Hamburgers by Jonathan Suh

Hamburger mobile menu

Download 1 - hamburgers css library and 2 - animate.css library too - and include the CSS in the <head> of your site:

<link rel="stylesheet" href="animate.min.css">
<link href="dist/hamburgers.css" rel="stylesheet">

Or use hamburgers scss source files with your Sass CSS precompiler. Customize and compile it here.

@almazka987
almazka987 / fa-icon-to-wp-admin-menu.md
Last active July 17, 2019 12:31
How to Add Font Awesome Icons to WordPress Menus

Using Font Awesome Icon In menu without plugins

When creating a custom post type, write empty attribute "menu_icon": So our whole registration hook looks like so:

$args = array(
    'labels' => $labels,
    'public' => true,
    'publicly_queryable' => true,
@almazka987
almazka987 / jquery-sticky-menu-and-scroll-to-anchor.md
Last active August 5, 2019 08:48
jquery sticky menu and link scroll to anchor

JQuery intellectual sticky menu which know how to scrolling when clicking an anchor link from sticky and static menu status

Html of link like this (you can use # instead of #lnk_):

<a class="alio-btn" href="#lnk_order-form">ORDER NOW</a>

The html structure of my navmenu is like this:

<header class="header">
@almazka987
almazka987 / fix-menu-link-title-attribute.md
Last active July 17, 2019 12:44
qTranslate-X plugin Language menu - fix menu link title attribute which includes img tag code by default