Last active
April 23, 2016 15:24
-
-
Save Sillson/1e5e7d9cbb6d57e37099 to your computer and use it in GitHub Desktop.
Gettin down with down-arrows
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
</style><script>function insertAfter(referenceNode, newNode) { | |
referenceNode.parentNode.insertBefore(newNode, referenceNode.nextSibling); | |
console.log(referenceNode.parentNode); | |
} | |
var div = document.getElementsByClassName("row-grid"); | |
var locationName = "[ENTER LOCATION NAME]"; | |
var locationCity = "[ENTER LOCATION CITY]"; | |
var locationState = "[ENTER LOCATION STATE]"; | |
var uPhotoSrc = ["ENTER PHOTO SOURCE"]; | |
var uPhotoAlt = "Custom graphic for "+locationName+" in "+locationCity+", "+locationState; | |
for (var i=0; i < div.length; i++){ | |
console.log(div[i]); | |
var el = document.createElement("figure"); | |
el.className = el.className + "photo photo-left down-arrow widget h-media"; | |
el.itemType = "http://schema.org/Photograph" | |
el.innerHTML = "<img class='u-photo' src='"+uPhotoSrc+"' alt='"+uPhotoAlt+"' itemprop='image'>"; | |
insertAfter(div[i], el); | |
}</script> | |
<style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also, add this to your CSS override widget in the "Adie Before Main" section. Fixes nav overlay issue.
.row .down-arrow {z-index:0;}