View swap-text-colors-with-variables.html
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Using css variables to change color in a specific section</title> | |
<link rel="stylesheet" href="./styles.css"> | |
</head> |
View align-lists-lsp.css
ul { | |
padding-left: 0; | |
list-style-position: inside; | |
} | |
View align-lists-background.css
ul { | |
padding-left: 0; | |
background-color: lightblue; | |
} | |
View align-lists-addback-padding.css
ul { | |
padding-left: 1.4rem; | |
} | |
View align-lists-remove-padding.css
ul { | |
padding-left: 0; | |
} | |
View ga-cf7-submit.js
document.addEventListener( 'wpcf7mailsent', function( event ) { | |
var form = event.target.querySelector( 'input[name="_wpcf7"]' ).getAttribute("value"); | |
if( parseInt( form ) == 4839 ) { | |
gtag('event', 'form_submit', { | |
event_category: 'Forms', | |
event_action: 'Submit', |
View ga-send-email-link-click.js
const emailLinks = document.querySelectorAll('a[href^="mailto:"]'); | |
emailLinks.forEach(function(emailLink){ | |
emailLink.addEventListener('click', () => { | |
gtag('event', 'link_click', { | |
event_category: 'Links', | |
event_action: 'Click', |
View ga-send-phone-link-click.js
const phoneLinks = document.querySelectorAll('a[href^="tel:"]'); | |
phoneLinks.forEach(function(phoneLink){ | |
phoneLink.addEventListener('click', () => { | |
gtag('event', 'link_click', { | |
event_category: 'Links', | |
event_action: 'Click', |
View ga-send-form-submit.js
const form = document.getElementById('my_form'); | |
form.addEventListener('submit', function(event){ | |
gtag('event', 'form_submit', { | |
event_category: 'Forms', | |
event_action: 'Submit', | |
event_label: 'Test form' // Name of your form. | |
}); |
View ga-send-page-view.js
gtag('event', 'page_view', { | |
page_title: 'Page title', | |
page_location: location.href, | |
page_path: location.pathname | |
}) | |
NewerOlder