Skip to content

Instantly share code, notes, and snippets.

View delowardev's full-sized avatar
🏠
Working from home

Delowar Hossain delowardev

🏠
Working from home
View GitHub Profile
<!--call css & js file-->
<?php
function theme_files(){
//css
wp_enqueue_style( $handle, $src, $deps, $ver, $media );
wp_enqueue_style( 'owl-theme', get_template_directory_uri().'/css/owl.theme.css', array(), '1.1', 'all' ); //example
.top {
box-shadow: 0 -5px 5px -5px #333;
}
.right {
box-shadow: 5px 0 5px -5px #333;
}
.bottom {
box-shadow: 0 5px 5px -5px #333;
}
<!-- in html -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only"></span>
<i class="fa fa-navicon"></i>
</button>
</div>
<nav class="main_menu collapse navbar-collapse" id="navbar">
<ul>
@delowardev
delowardev / Stick Div
Last active September 20, 2016 15:04
<!-- html -->
<div class="sticky_anchor"></div>
/* css */
.sticky{
position: fixed;
top: 0;
z-index: 2;
$(window).scroll(function(){
if ($(this).scrollTop() > 150) {
$('.topScrl').fadeIn();
} else {
$('.topScrl').fadeOut();
}
});
//Click event to scroll to top
$('.topScrl').click(function(){
var resizeId;
$(window).resize(function() {
clearTimeout(resizeId);
resizeId = setTimeout(doneResizing, 500);
});
function doneResizing(){
location.reload();
}
Demo & Download Link: http://dimsemenov.com/plugins/magnific-popup/
01. Youtube video >>
// html markup
<a href="http://www.youtube.com/watch?v=0O2aH4XLbto" class="videoBtn">Watch Video</a>
// javascript
<?php
/**
* Set a max limit on the number of times
* a repeating group can be added.
*/
/**
* Setup the group field metabox
*/
function js_limited_group_setup() {
function wpj_default_menu() {
echo '<ul id="dropmenu">';
if ('page' != get_option('show_on_front')) {
echo '<li><a href="'. home_url() . '/">Home</a></li>';
}
wp_list_pages('title_li=');
echo '</ul>';
}