Skip to content

Instantly share code, notes, and snippets.

View faruk09's full-sized avatar

Abdullah Al Faruk faruk09

View GitHub Profile
body{
font-family: Georgia;
}
p{
color: #999999;
}
li a{
text-decoration: none;
display: block;
}
@faruk09
faruk09 / index.php
Created August 11, 2014 09:49
index.php
<?php
/**
* The main template file.
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
* Learn more: http://codex.wordpress.org/Template_Hierarchy
*
Root url for website
---------------------------------------------------------
<?php site_url(); ?>
<?php bloginfo('url'); ?>
title of specific post/page
---------------------------------------------------------
<?php wp_title(); ?>
Title of site
add_action( 'wp_enqueue_scripts', 'jk_masonry' );
function jk_masonry() {
wp_enqueue_script( 'jquery-masonry', array( 'jquery' ) );
}
/*
How to use?
$('#container').masonry({ singleMode: true });
last 2 child add class
------------------------
$('ul.menu>li').slice(-2).addClass('last-elements');
lenth
---------
if ($(".active").length) {
$(".active").dropify();
}
@faruk09
faruk09 / easy-pie-chart-master
Last active August 6, 2019 09:02
For circle counter
https://rendro.github.io/easy-pie-chart/
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<title>jQuery</title>
<meta name="viewport" content="width=device-width"/>
<link rel="stylesheet" href="style.css"/>
</head>
//HTML Code
<button id="topBtn"><i class="fas fa-arrow-up"></i></button>
//CSS Code
#topBtn{
position: fixed;
bottom: 40px;
right: 40px;
font-size: 22px;
width: 50px;
// Sticky Navigation
$(window).on('scroll',function() {
var scroll = $(window).scrollTop();
if (scroll < 40) {
$(".sticky").removeClass("scroll-header");
}else{
$(".sticky").addClass("scroll-header");
}
});
<!-- Google Map js -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyDC3Ip9iVC0nIxC6V14CKLQ1HZNF_65qEQ "></script>
function basicmap() {
// Basic options for a simple Google Map
// For more options see: https://developers.google.com/maps/documentation/javascript/reference#MapOptions
var mapOptions = {
// How zoomed in you want the map to start at (always required)
zoom: 11,
scrollwheel: false,