Skip to content

Instantly share code, notes, and snippets.

View jdmgarcia's full-sized avatar
🎯
Focusing

Juanma Garcia jdmgarcia

🎯
Focusing
  • Packlink
  • Madrid, Spain
View GitHub Profile
@jdmgarcia
jdmgarcia / blockClicks.js
Created September 19, 2017 14:13 — forked from lucas-pelton/blockClicks.js
Prevent multiple clicks and submissions in Contact Form 7
//http://epsiloncool.ru/programmirovanie/preventing-multiple-submits-in-contact-form-7
jQuery(document).on('click', '.wpcf7-submit', function(e){
if( jQuery('.ajax-loader').hasClass('is-active') ) {
e.preventDefault();
return false;
}
});
@jdmgarcia
jdmgarcia / functions.php
Created March 12, 2018 11:22 — forked from jonathanjanssens/functions.php
Add schema to yoast seo breadcrumbs
<?php
/**
* Add schema to yoast seo breadcrumb
*/
add_filter('wpseo_breadcrumb_links', 'jj_add_crumb_schema', 10, 1);
function jj_add_crumb_schema($crumbs) {
if ( ! is_array( $crumbs ) || $crumbs === array() ) {
@jdmgarcia
jdmgarcia / README.md
Created August 20, 2018 16:07 — forked from pbojinov/README.md
Two way iframe communication- Check out working example here: http://pbojinov.github.io/iframe-communication/

Two way iframe communication

The main difference between the two pages is the method of sending messages. Recieving messages is the same in both.

Parent

Send messages to iframe using iframeEl.contentWindow.postMessage Recieve messages using window.addEventListener('message')

iframe