Web Dev
SASS – Something Went Wrong Reaching
Tearing my hair out, trying to figure out what’s wrong with my SASS files. I keep get a “something went wrong reaching…”, with a long filename of sass files, none of which is helpful. My guess is you’re probably using Visual Studio, and using Web Essentials to compile your SASS. To solve this (at least […]
Read MoreUsing Handlebars Templates
It generally takes me a few minutes to tease out the right code on the handlebars page to get everything to work, here is the essential code for setting up a handlebars template via javascript: Template Code (Html): Javascript Code: var data = {title: “Test Title”, body: “Test Body”}, source = $(“#test-template”).html(), template = Handlebars.compile(source), […]
Read MoreA Simple Slideout Menu
I just wanted an easy slideout menu. Click on a link, and the menu slides out from the left side of the screen. Click on the link again, or somewhere else on the page, and the menu slides back in. Here it is: HTML Code data-openwidth is the width in pixels of however wide you […]
Read MoreGit Ignore a Directory
There is a folder within a project that you don’t want to be tracked with git, to do this on a windows computer: 1. In the project folder managed by git, make a new file named ‘.gitignore.’ (no quotes, but with periods at both ends — it will automatically be changed to ‘.gitignore’ 2. Add […]
Read MoreWhy Isn’t My SVG Image the Right Size in Internet Explorer
My svg images looked fine in the good browsers, but in Internet Explorer, they were appearing huge! I attempted to just set the size using css in the image tag, but that didn’t work. What actually did work, was I opened up the svg file, and added a “viewBox” value to the svg declaration, so […]
Read MoreEnhancements for jPlayer Implementation
I love the jPlayer for easily being able to add modern mp3 support to web pages. I wanted a few additional features, so I created this additional script which adds a few updated features: Adding rewind/fast-forward support Ability to toggle the volume controls on and off Ability to specify the mp3 url by setting a […]
Read MoreOrganizing Files for Web Projects
Historically I’ve always organized my website files pretty much based on file type. For example, I would have an images folder, and a folder for javascript files, and a folder for sass/css files (php files generally are organized fairly logically, based on what they do). It seems like this is a normal setup, and this […]
Read MorePreserving Click Events With jQuery UI
My click events weren\’t being preserved when using the jquery sortable functionality. After dragging a list item around, elements like my checkboxes would no longer work, and not just for the element that was being dragged, but for any of the checkboxes in the entire list. It took a bit of searching, but to get […]
Read MoreChange Placeholder Text Color
Change the placeholder color of the text for input boxes in a form: ::-webkit-input-placeholder { color: #000; } :-moz-placeholder { color: #000; } ::-moz-placeholder { color: #000; } :-ms-input-placeholder { color: #000; }
Read MoreJavascript define a variable if it isn’t defined currently
It seems like this comes up quite a bit. This will create a new variable if the variable isn\’t currently defined: var myVariable = myVariable || “”; Or to define it as an array: var myVariable = myVariable || {};
Read More