Skip to content

Instantly share code, notes, and snippets.

View jonmunson's full-sized avatar

Jon Munson jonmunson

View GitHub Profile

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

How to remove hide the <select> arrow in Firefox using -moz-appearance:none;

Background

I was experimenting on custom styling the <select> elements of a form I was building. One of the things I tried implementing was truncating the text with an ellipsis in case it extended beyond the <select>'s width. It didn't look consistent through browsers, but I've accidentally discovered something really nice.

The bug

@jonmunson
jonmunson / orbit-custom-nav.css
Created December 9, 2013 15:24
Zurb Orbit custom navigation styles - My solution in F5 was to create new completely separate buttons (".next-slide" and ".prev-slide"), and then trigger the existing functionality with some JS overrides.
/* hide the built in controls */
.orbit-container .orbit-prev, .orbit-container .orbit-next {display: none;}
@jonmunson
jonmunson / checkbox-validate.js
Created November 4, 2013 12:19
Validation script to determine a "checkbox" state
//Validation for Sponsor in Application Edit/Show
function validate(){
var hasSponsor = document.getElementById('hasSponsor'); //check box ID
if (hasSponsor.checked){
sponsorUrl = document.getElementById('sponsorUrl'); //sponsor URL field ID
sponsorImage = document.getElementById('sponsorImage'); //sponsor Image field ID
/**
* Given a source directory and a target filename, return the relative
* file path from source to target.
* @param source {String} directory path to start from for traversal
* @param target {String} directory path and filename to seek from source
* @return Relative path (e.g. "../../style.css") as {String}
*/
function getRelativePath(source, target) {
var sep = (source.indexOf("/") !== -1) ? "/" : "\\",
targetArr = target.split(sep),
@jonmunson
jonmunson / phonegap-flicker.css
Created October 31, 2013 15:04
PhoneGap - fix flickering issue by forcing use of hardware accelleration
.scrollArea {
-webkit-transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-webkit-perspective: 1000;
}
@jonmunson
jonmunson / tinymce-disable-certain-textarea.js
Created October 18, 2013 13:36
TinyMCE - disable the WYSIWYG editor on <textarea> with a specific class
selector: "textarea", // Select all textarea
selector: "textarea.editme", // Select all textarea with the class editme
selector : "textarea:not(.mceNoEditor)", // Select all textarea exluding the mceNoEditor class
@jonmunson
jonmunson / disable-anchor.css
Created October 17, 2013 12:19
Disable links using CSS
#home nav .home > a {
pointer-events: none;
cursor: default;
}
@jonmunson
jonmunson / tinymce-disable-p-tags
Created October 16, 2013 12:01
TinyMCE - disable <p> tags, use <br> instead
<script type="text/javascript" src="/js/tinymce/tinymce.min.js'"></script>
<script type="text/javascript">
tinymce.init({
selector: "textarea",
forced_root_block : false,
force_p_newlines : false,
remove_linebreaks : false,
force_br_newlines : true,
remove_trailing_nbsp : false,