Códigos referentes ao post Executar um vídeo a partir de um click na thumbnail
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
jQuery(document).ready(function($) { | |
var update_row_colours = function() { | |
$('[data-name="adicionar_experiencias"] .acf-table .acf-row').each( function() { | |
var strat = $( this ).find('[data-name="iniciou_no_dia"] input.input-alt'); | |
var end = $( this ).find('[data-name="terminou_no_dia"] input.input-alt'); | |
var strat_date = new Date( strat.val() ); |
Códigos referentes ao post Criar Borda Serrilhada Somente com CSS3
Criação de um formulário via Contact Form 7 com select personalizado com Option Group para seleção de departamentos.
Download do Contact Form 7
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 | |
/** | |
* Returns ID of top-level parent category, or current category if you are viewing a top-level | |
* | |
* @param string $catid Category ID to be checked | |
* @return string $catParent ID of top-level parent category | |
*/ | |
function smart_category_top_parent_id ($catid) { | |
while ($catid) { | |
$cat = get_category($catid); // get the object for the catid |
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 | |
function hex2RGB($hex) { | |
$hex = str_replace("#", "", $hex); | |
if(strlen($hex) == 3) { | |
$r = hexdec(substr($hex,0,1).substr($hex,0,1)); | |
$g = hexdec(substr($hex,1,1).substr($hex,1,1)); | |
$b = hexdec(substr($hex,2,1).substr($hex,2,1)); | |
} else { | |
$r = hexdec(substr($hex,0,2)); | |
$g = hexdec(substr($hex,2,2)); |
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
// <![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) { |
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
//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); |
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
var $window = $(window), $html = $('html'); | |
$window.resize(function resize(){ | |
if ($window.width() < 415) { | |
return $html.addClass('mobile'); | |
} | |
$html.removeClass('mobile'); | |
}).trigger('resize'); |