This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Vanilla Javascript DropDown Menu Example</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
</head> | |
<body> | |
<div id="menu-dropdown">Menu ▼</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HTML | |
index.html | |
------------------------------- | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>AJAX Contact Form Demo</title> | |
<link rel="stylesheet" href="style.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* localize script */ | |
wp_enqueue_script( 'settings', get_template_directory_uri() . '/js/settings.js', array('jquery'), OO_Version, true ); | |
wp_localize_script( 'settings', 'localized', array( | |
'ajaxurl' => admin_url( 'admin-ajax.php' ) | |
)); | |
/* setting.js */ | |
jQuery(function($){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready( function(){ | |
$('#trigger').click( function(event){ | |
event.stopPropagation(); | |
$('#drop').toggle(); | |
}); | |
// this is the most important part | |
$(document).click( function(){ | |
$('#drop').hide(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//HTML | |
<div class="slider"> | |
<img src="https://source.unsplash.com/random" alt="" /> | |
<img src="https://source.unsplash.com/category/nature" alt="" /> | |
<img src="https://source.unsplash.com/category/food" alt="" /> | |
<img src="https://source.unsplash.com/category/people" alt="" /> | |
</div> | |
//CSS |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Register a custom post type called "book". | |
* | |
* @see get_post_type_labels() for label keys. | |
*/ | |
function intensiv_custom_post_type_gallery() { | |
$labels = array( | |
'name' => _x( 'Galleries', 'Post type general name', textdomain' ), | |
'singular_name' => _x( 'Gallery', 'Post type singular name', 'textdomain' ), | |
); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* http://meyerweb.com/eric/tools/css/reset/ | |
v2.0-modified | 20110126 | |
License: none (public domain) | |
*/ | |
html, body, div, span, applet, object, iframe, | |
h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
a, abbr, acronym, address, big, cite, code, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; // Exit if accessed directly | |
} | |
? |