Skip to content

Instantly share code, notes, and snippets.

View travisdmathis's full-sized avatar
🏠
Working from home

Travis Mathis travisdmathis

🏠
Working from home
View GitHub Profile
replace_original: function() {
ro = $('.asset_detail .asset_detail_navbar li div.parent li span.replace_original');
ro.click(function() {
$('.edit_button').click();
$('#asset_uploaded_file_path').click();
});
},
BEGIN
(0.1ms) ROLLBACK
=> #<MonthlyStat id: nil, client_id: 23, stat_type: "StorageTotal", month: "June", year: 2014, value: 106862824740, created_at: nil, updated_at: nil>
class MonthlyStat < ActiveRecord::Base
belongs_to :client
attr_accessible :client_id, :month, :stat_type, :value, :year
accepts_nested_attributes_for :client
classy_enum_attr :stat_type, enum: 'MonthlyStatType'
function move (e){
var moveby = {
x: origin.x - e.clientX,
y: origin.y - e.clientY
};
if (movecontinue === true) {
start.x = start.x - moveby.x;
start.y = start.y - moveby.y;
//position by percentage conversion
width = $("#folder_image_picker_modal .folder_image").css('background-size').replace('% auto','');
$("document").ready(function(){
$("a").hover(function(){
$('i').toggleClass('flaticon-negative7');
});
});​
<?php
//WordPress loop for custom post type
$my_query = new WP_Query('post_type=projects&projects_categories=featured&posts_per_page=-1');
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<?php if ( has_post_thumbnail()) : ?>
<?php the_post_thumbnail(); ?>
</a>
<?php endif; ?>
<h4><?php the_title(); ?></h4>
<p><?php the_excerpt(); ?></p>
@travisdmathis
travisdmathis / figcaption.css
Created April 23, 2014 14:42
Trying to check for figcaption height and if 100% scroll down to 10%
figure {
margin: 100px auto;
width: 479px;
height: 541px;
overflow: hidden;
position: relative;
}
figcaption {
position: absolute; display: block;
figure {
margin: 100px auto;
width: 479px;
height: 541px;
overflow: hidden;
position: relative;
}
figcaption {
position: absolute; display: block;
post_type=gallery&gallery_categories=weddings&orderby=menu_order&order=ASC
what im doing is made a var called $catg which carries the slug, I want to use the slug as a category name, so I pass that var into the $arg string for 'gallery_categories='.$catg
3:36 which works great for echo,,not great when actually used in wp_query($args);
<!-- sign up form -->
<div id="signup">
<div class="background">
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="row">
<h2 class="secondary text-center"> GET YOUR <u><font class="white">FREE</font></u> WALLET</h2>
</div>
</div>
.navbar-collapse, .collapse {
overflow-x:hidden;
}
.navbar-collapse.in {
overflow-y:auto;
}