Skip to content

Instantly share code, notes, and snippets.

<script type="text/javascript">
function showImage(imgPath, imgText) {
var curImage = document.getElementById('currentImg');
curImage.src = imgPath;
curImage.alt = imgText;
curImage.title = imgText;
}
<style>
.colorpicker {
list-style-type:none;
}
.colorpicker li {
float: left;
list-style-type:none;
text-align: center;
}
<ul class="colorpicker">
<li><img src="/wp-content/uploads/2017/07/teacup1.png" onclick="showImage('/wp-content/uploads/2017/07/teacup1.png','Blue');" data-pin-nopin="true"><br>Blue</li>
<li><img src="/wp-content/uploads/2017/07/teacup2.png" onclick="showImage('/wp-content/uploads/2017/07/teacup2.png','Red');" data-pin-nopin="true"><br>Red</li>
<li><img src="/wp-content/uploads/2017/07/teacup3.png" onclick="showImage('/wp-content/uploads/2017/07/teacup3.png','Orange');" data-pin-nopin="true"><br>Orange</li>
<li><img src="/wp-content/uploads/2017/07/teacup4.png" onclick="showImage('/wp-content/uploads/2017/07/teacup4.png','Green');" data-pin-nopin="true"><br>Green</li>
</ul>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<div id="fixed-flag"><a href="http://www.yourgreatsite.com/dealers/"><span>Find your</span><br>Dealer</a></div>
/* Fixed Flag on Side of Screen */
#fixed-flag {
background: #fff;
position: fixed;
top: 120px;
right: 0;
z-index: 999;
border-radius: 4px 0 0 4px;
}
#fixed-flag a {
[one_half]<label>[text* your-name placeholder "Name (required)"]</label>[/one_half][one_half_last]<label>[text* your-phone placeholder "Phone (required)"]</label>[/one_half_last]
<label>[email* your-email placeholder "Email (required)"]</label>
<label>[text your-subject placeholder "Subject"]</label>
<label>[textarea your-message placeholder "Your Message"]</label>
[recaptcha]
[submit "Send"]
/* Styling CF7 to look like the Divi Contact Form */
.wpcf7-text, .wpcf7-textarea, .wpcf7-captchar {
background-color: #eee !important;
border: none !important;
width: 100% !important;
-moz-border-radius: 0 !important;
-webkit-border-radius: 0 !important;
border-radius: 3px !important;
font-size: 14px;
color: #999 !important;
/* Increase mobile menu bar height */
.et_header_style_left .mobile_menu_bar {
padding-bottom: 85px;
}
/* Moved hamburger down */
.mobile_menu_bar:before {
top: 35px !important;
}
/* Increased letter spacing on mobile menu */
.et_mobile_menu {
letter-spacing: 2px;
}
/* Increased font size on mobile menu */
.et_mobile_menu li a {
font-size: 18px;
}