Skip to content

Instantly share code, notes, and snippets.

davidwerks

  • Sun
Block or report user

Report or block davidwerks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View basin ajax script
//apply only to forms with the action pointing to Basin
$('form[action^="https://usebasin.com"]').each(function(i,el){
console.log($(el));
$(el).submit(function(e){
//stop the form from submitting
e.preventDefault();
const _form = $(e.target);
// form parent
const _parent = $(_form.parent());
//get the form's action parameter and add ".json" to the end
@davidwerks
davidwerks / scroll-link
Created Aug 18, 2017
scroll-link markup
View scroll-link
View gist:81dbbdc68f8fa3d1243de853b27817aa
<ul class="timeline vertical-indication">
<li>
<div class="row">
<div class="timeline-title column width-3 right left-on-mobile">
<h5>Timeline Title</h5>
</div>
<div class="timeline-description column width-9">
<p>Timeline Description</p>
</div>
</div>
View marquez_custom_css_kookoo
/**
* http://cuckooparrot.com/
*/
/** extra fonts */
@import url('https://fonts.googleapis.com/css?family=Pacifico|Sofia|Slabo+27px');
/** css */
.header .logo a {
@davidwerks
davidwerks / jscomposer UI.js
Last active Dec 13, 2017
Expanded version of jscomposer UI.js
View jscomposer UI.js
function vc_toTitleCase(str) {
return str.replace(/\w\S*/g, function(txt) {
return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase()
})
}
function vc_convert_column_size(width) {
var numbers = width ? width.split("/") : [1, 1],
range = _.range(1, 13),
num = !_.isUndefined(numbers[0]) && 0 <= _.indexOf(range, parseInt(numbers[0], 10)) && parseInt(numbers[0], 10),
View vc_row custom After
<?php
namespace ThemeMountain;
/** Find basename */
if(isset($this)) {
$_base = $this->settings['base'];
} else if (isset($tagname)) {
$_base = $tagname;
} else {
$_base = FALSE;
View gist:a7840003a678a0ed9ab11ce2dcb33408
<script src="http://maps.googleapis.com/maps/api/js?v=3"></script>
@davidwerks
davidwerks / gist:36166c27748ce46471854224b1ec7138
Created Sep 16, 2016
Example Google Maps (CSS timber framework)
View gist:36166c27748ce46471854224b1ec7138
<!-- Map Section -->
<div class="section-block no-padding">
<div class="row collapse full-width">
<div class="column width-12 center">
<div class="map-container" data-coordinates="[[40.723301,-74.002988]]" data-icon='"images/assets/map-marker.png"' data-info='"Downtown New York Office<br>44 St. West 32"' data-zoom-level="13" data-style="color">
<div class="map-canvas" id="map-canvas-1"></div>
</div>
</div>
</div>
</div>
You can’t perform that action at this time.