Skip to content

Instantly share code, notes, and snippets.

@1-800-jono
1-800-jono / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@1-800-jono
1-800-jono / wpml_conditional.php
Created October 20, 2014 16:43
WPML Wordpress plugin conditionals for multi-language content
<?php if (ICL_LANGUAGE_CODE == 'es') { echo 'Español content'; } elseif (ICL_LANGUAGE_CODE == 'pt-br') { echo 'PT brazil content'; } else { echo 'Deafult language - english';}?>
@1-800-jono
1-800-jono / placeholder_color.css
Created October 21, 2014 17:26
Input placeholder color CSS
input::-webkit-input-placeholder {
color: #000;
}
input:-moz-placeholder { /* Firefox 18- */
color: #000;
opacity: 1;
}
input::-moz-placeholder { /* Firefox 19+ */
@1-800-jono
1-800-jono / get_category_link_wpml.php
Created October 22, 2014 18:41
Get category link for use with WPML plugin. The number is for category ID.
@1-800-jono
1-800-jono / option_go_to_url.js
Created November 6, 2014 19:30
Use option value in select element to go to a URL. Replace "catUrl" with select name value.
jQuery(function(){
jQuery('select[name="catUrl"]').change(function() {
window.location.replace($(this).val());
});
});
@1-800-jono
1-800-jono / make_table_responsive.scss
Last active August 29, 2015 14:18
Sass mixin for making tables responsive
@mixin responsive-table($thead-title...) {
table {
width: 100%;
border-collapse: collapse;
}
@media only screen and (max-width: 760px), (min-device-width: 768px) and (max-device-width: 1024px) {
/* Force table to not be like tables anymore */
@1-800-jono
1-800-jono / Sortable List using Angularjs and ng-sortable.markdown
Created October 8, 2015 02:17
Sortable List using Angularjs and ng-sortable

Sortable List using Angularjs and ng-sortable

Drag and drop sortable list with click sound

A Pen by Jonathan on CodePen.

License.

@1-800-jono
1-800-jono / Canvas background color change on scroll.markdown
Created June 17, 2016 19:47
Canvas background color change on scroll

Canvas background color change on scroll

This is in process right now. The idea is to have color animation on scroll with canvas.

A Pen by Jonathan on CodePen.

License.

@1-800-jono
1-800-jono / cycle-repeater-acf.php
Created September 2, 2016 16:04
ACF repeater fields used in Cycle2 jQuery plugin. This requires Cycle2 plugin (http://jquery.malsup.com/cycle2/) but can probably be used on other slider with some customization.
<section class="tab-slide">
<div id="tab-slide-pager" class="tab-slide__anchor-wrapper"></div>
<div class="cycle-slideshow"
data-cycle-fx="fade"
data-cycle-pager="#tab-slide-pager"
data-cycle-timeout="0"
data-cycle-slides="> div"
>
<?php if( have_rows('repater_field') ): ?>
<?php while ( have_rows('repater_field') ) : the_row() ; ?>