javascript
Enhancements 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 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 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 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 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 MoreA Super Simple jQuery Fading Slideshow
I usually end up doing a search about every month for a nice slideshow script that fades between the various slides, provides some functionality for the user to jump to a specific slide, and that\’s about it. It doesn\’t have to do crazy transitions or bring out the razzle and dazzle, it just needs to […]
Read MoreNamespacing in Javascript
So the other night I was working on some fancy script. It didn’t work. After a bit of investigation, it turns out that one of the function names was already being used by a different function. Bummer. Of course this is why people use namespacing, to avoid problems such as this. So, here’s how to […]
Read More-
Adventure
-
The Built Environment
-
Locations
-
Web Dev