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
/*! jQuery.counter.js (jQuery Character and Word Counter plugin) | |
v2.0 (c) Wilkins Fernandez | |
MIT License | |
*/ | |
(function($) { | |
$.fn.extend({ | |
counter : function(options) { | |
var defaults = { | |
type : 'char', // {char || word} | |
count : 'down', // count {up || down} from or to the goal number |
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
/* | |
Specials Page | |
*/ | |
if($j('.specials-wrapper').length > 0 ) { | |
$j('.specials-cat-nav li:first-child').addClass('active'); | |
$j('.specials-page').find('.cat-wrapper').not(':first-child').hide(); | |
$j('.specials-page .cat-wrapper:first-child').addClass('active'); | |
// opening new section on click | |
$j('.specials-cat-nav li a').live('click', function(e) { |
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
<?php | |
$args = array( 'pagename' => 'contact'); | |
$loop = new WP_Query( $args ); | |
while ( $loop->have_posts() ) : $loop->the_post(); | |
?> | |
<h2><?= the_title();?></h2> | |
<p><?= the_content(); ?></p> | |
<?php endwhile; ?> | |
<?php wp_reset_query(); ?> |
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
.sidebar | |
.sidebar-top.hide-on-phones | |
%dl.nice.vertical.tabs | |
- current_workplan.objectives.each do |o| | |
%dd.active | |
= link_to o, workplan_objective_path(current_workplan, o) | |
%span.arrows.hide-on-phones | |
%span.loop | |
%ul.children | |
- o.tactics.each do |t| |
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
[{:active=>"no", :start=>Tue, 15 May 2012 20:42:17 UTC +00:00, :amount=>"10.00", :card_type=>"Visa", :card_number=>"0195"}] | |
<p>Get this output at the end of my .each</p> |
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
class PaymentsController < ApplicationController | |
before_filter :authenticate_member! | |
autocomplete :company, :name, :full => true, :extra_data => [:address1, :address2, :city, :state, :zip, :business_category_id, :revenue_id], :scopes => [:inactive] | |
respond_to :json, :only => [:dues] | |
def index | |
end | |
def new | |
@payment = Payments.new(:member_id => current_member) |
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
_isValidFileDrag: function(e){ | |
var dt = e.dataTransfer, | |
// do not check dt.types.contains in webkit, because it crashes safari 4 | |
isWebkit = navigator.userAgent.indexOf("AppleWebKit") > -1; | |
console.log(dt); | |
// dt.effectAllowed is none in Safari 5 | |
// dt.types.contains check is for firefox | |
return dt && dt.effectAllowed != 'none' && | |
(dt.files || (!isWebkit && dt.types.contains && dt.types.contains('Files'))); |
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
if @comment.valid? | |
page.insert_html :after, :comment_new, :partial => "comment", :locals => { :comment => @comment } | |
page[dom_id(@comment)].visual_effect :highlight, :duration => 1.5 | |
end | |
page[:shown_notes].value = @comment.commentable.comment_ids.join(',') | |
page[:comment_comment].clear | |
page[:comment_comment].focus |
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
.control-group.required.upload-photos | |
= f.label 'Upload files', required: false | |
.controls | |
.file-upload-wrapper | |
= link_to '#', class: 'file-upload red-btn' do | |
%i.icons.upload | |
Upload | |
= f.input :attachment, | |
as: :file, | |
wrapper_html: { class: 'hidden-upload' }, |
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
class PetPhotoUploader | |
# html5 multiple uploader with fallback | |
dom = | |
parent_wrapper: '.controls' # wrapper that contains all parent elements | |
parent: '.file-upload-wrapper' # container/wrapper of the file uploader | |
hidden_upload: '.hidden-upload' # hidden file input | |
file_text: '.file-text' # hidden wrapper notice to user which files they (will) uploaded | |
delete_file: '.delete-upload-file' # link to delete uploaded files | |
uploaded_count = 0 # total files uploaded |
OlderNewer