This file contains 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
var eventClick = (navigator.userAgent.match(/(iPad|iPhone|Android)/i)) ? "touchstart" : "click"; | |
$('.myselector').bind(eventClick, function(event) { | |
// do stuff | |
}); |
This file contains 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 | |
// WP_Query arguments | |
$args = array ( | |
'post_type' => 'page', | |
'posts_per_page' => '4', | |
'post_parent' => 9 | |
); | |
// The Query | |
$query = new WP_Query( $args ); |
This file contains 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
$('div').each(function(index, el) { | |
// Fetch an array of all the data | |
el = $(el); | |
var data = el.data(), | |
i; | |
// Fetch all the key-names and put them in a variable called keys | |
var keys = $.map(data , function(value, key) { return key; }); | |
// Loop through the keys, remove the attribute if the key contains "lorem". | |
for(i = 0; i < keys.length; i++) { |
This file contains 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
# ----------------------------------------------------------------- | |
# .gitignore for WordPress | |
# ----------------------------------------------------------------- | |
# ignore everything in the root except the "wp-content" directory. | |
/* | |
!wp-content/ | |
# ignore all files starting with . | |
.* |
This file contains 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
if( function_exists('acf_add_options_page') ) { | |
acf_add_options_page(array( | |
'page_title' => 'Options', | |
'menu_title' => 'Options', | |
'menu_slug' => 'options', | |
'capability' => 'edit_posts', | |
'redirect' => false | |
)); | |
This file contains 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
$('input#submit').click(function(){ | |
var email = $('input#email').val(); | |
var flag = true; | |
$('input.req').each(function(){ | |
// if the input.req is empty... | |
if ($(this).val() == "") { | |
$(this).nextAll('span:first').fadeIn(); | |
flag = false; | |
} else { | |
// if the input#email field has no @ sign... |
OlderNewer