Skip to content

Instantly share code, notes, and snippets.

@neurobotic
neurobotic / htaccess.txt
Created November 20, 2015 21:45
Header set Access-Control-Allow-Origin
/**
* @link http://stackoverflow.com/questions/10640596/
*/
Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"
@neurobotic
neurobotic / functions.php
Last active September 2, 2015 14:13 — forked from wpscholar/functions.php
Enqueueing IE conditional stylesheets in WordPress the right way
<?php
add_action( 'wp_enqueue_scripts', 'enqueue_my_styles' );
function enqueue_my_styles() {
global $wp_styles;
// Load the main stylesheet
wp_enqueue_style( 'my-theme', get_stylesheet_uri() );
@neurobotic
neurobotic / jQuery active nav
Created May 1, 2015 20:15
jQuery - active nav demo for Aaron
<style>
.activenav{
color: red;
}
</style>
<script>
(function($) {
$('.menu > li > a').click(function() {
$("a.activenav").removeClass('activenav');
$(this).addClass('activenav');