View main.js
//Create the VAR for get browser size | |
var windowWidth = $(window).width(); | |
$(window).bind('resize', function(e) { | |
//Verification with my VAR windowWidth is different Window size | |
if(windowWidth != $(window).width()){ | |
//Create a delay for reload | |
if (window.RT) clearTimeout(window.RT); window.RT = setTimeout(function() { | |
this.location.reload(false); | |
}, 200); |
View functions.php
<?php | |
add_filter( 'wc_add_to_cart_message', 'custom_add_to_cart_message' ); | |
function custom_add_to_cart_message( $product_id ) { | |
$product_id = $_REQUEST[ 'product_id' ]; | |
if ( is_array( $product_id ) ) { | |
$titles = array(); |
View filter-external.js
$('.filterBlog a').on('click', function(e) { | |
filterBlogHash(this.hash, e); | |
}); | |
$(window).on('load',function() { | |
filterBlogHash(window.location.hash); | |
}); | |
function filterBlogHash(hash, e) { | |
if(hash === '') { |
View filter.js
$('.filterBlog').on('click', 'a', function(e){ | |
e.preventDefault(); | |
var hash = $(this).attr('href').replace(/^.*?(#|$)/,''); | |
$('.filter a.type').each(function (index, value) { | |
// console.log('filter' + index + ':' + $(this).attr('id')); |
View functions.php
<?php | |
/** | |
* Brazillian states | |
* Function - Vender Somente para Estados Específicos - WooCommerce | |
*/ | |
function wc_especifico_estado( $states ) { | |
$states['BR'] = array( | |
'SP' => __( 'São Paulo', 'woocommerce' ), | |
'RJ' => __( 'Rio de Janeiro', 'woocommerce' ), | |
); |
View functions.php
<?php | |
/** | |
* Related Posts. | |
* | |
* Usage: | |
* To show related by categories: | |
* Add in single.php <?php chr_related_posts(); ?> | |
* To show related by tags: | |
* Add in single.php <?php chr_related_posts( 'tag' ); ?> | |
* |
View functions.php
<?php | |
$post_type = 'post'; | |
// Get all the taxonomies for this post type | |
$taxonomies = get_object_taxonomies( (object) array( 'post_type' => $post_type ) ); | |
foreach( $taxonomies as $taxonomy ) : | |
// Gets every "category" (term) in this taxonomy to get the respective posts | |
$terms = get_terms( $taxonomy, |
View main.js
// <![CDATA[ | |
jQuery(function($) { | |
$.mask.definitions['~']='[+-]'; | |
//Inicio Mascara Telefone | |
$('input[type=tel]').focusout(function(){ | |
var phone, element; | |
element = $(this); | |
element.unmask(); | |
phone = element.val().replace(/\D/g, ''); | |
if(phone.length > 10) { |
View 00-README.md
Exibir ou Ocultar a sua senha com jQuery
Exibir ou Ocultar a sua senha com jQuery
Códigos referentes ao postArquivos
NewerOlder