Web Dev
Debugging Firefox Mobile on Your Computer
I needed to debug a web page that I was working on, which was having some issues on mobile versions of firefox. I just needed to look at the console, but setting this up was a bit complicated, moreso than it should be. This should hopefully help: On your phone: Settings>About Phone>Build number (tap this 7 times […]
Read MoreHandlebars Just Adds Bloat and Complication
I kind of like Handlebars for templating, but more and more, I think it’s just makes the codebase more bloated and complicated: My problems with handlebars: 1. I can’t just use my existing javascript code. For instance, I have an existing function to format a phone number, but to use this within a handlebars template, […]
Read MoreReference a Handlebars Template From Another Template (Nesting Templates)
Within the JS file, register a new partial (note: avoid underscores with with the name of the partial, or with the template names…this seems to cause issues): Handlebars.registerPartial(“inner-template”,$(“#tpl-inner-template”).html()); In the template template that you want to include the partial in, just reference the partial with: {{> inner-template Data }} If the data isn’t showing, try […]
Read MoreFixing Jagged Rendering on CSS Shapes and Arrows in Firefox
I\’ve been using the border elements on divs to create useful shapes, like arrows, like on this page. Unfortunately, recently Firefox recently began having trouble rendering the diagonals — making them appear jagged, and just not very pleasing. To fix this, just add the following to the css: -moz-transform: scale(.9999);
Read MoreFixed position div isn’t staying fixed in Chrome
I was working on a little menu specifically for mobile devices. It was intended that this menu stay fixed at the bottom of the screen. It usually worked, but in some instances in chrome, it would be thrown all the way to the bottom of the document, not the bottom of the window. It looks […]
Read MoreSASS Quick Guide
Include a mixin (in this case, a mixin with the name of testmixin): .sample-class{ border: 1px solid red; @include testmixin(); }
Read MoreRGBA Color Format
Just a sample RGBA color format. This will make a black line (rgb 0, 0, 0), but with .3 opacity: .sample-class{ border-right: 1px solid rgba(0,0,0,0.3); }
Read MoreSlide a Div Up From the Bottom of the Page
Sliding down/up from an element is easy, but I had a menu at the bottom of the page, and I wanted a hidden menu to slide up from the bottom of the page, encompass the whole page, and then slide back down when it was time for it to hide. I tried quite a bit of stuff […]
Read MoreOnly Include jQuery if it Hasn’t Already Been Included
If jQuery gets included twice, things break. Because of various nested documents with server-side scripts, I encountered a few situations were jQuery would occassionally be included twice. To check, and make sure to only include it once, you can use the following:
Read MoreShowing HTML Code on a Web Page
There is obviously a need a site like this to show HTML code within a blog post. Recently the need for this functionality also arose at work, so I decided to put together a quick script to make the task easier. This will scan for a tag with the class of code (ideally a ‘pre’ […]
Read More