Journal.
Random thoughts and code snippets.

jQuery Multi-select

  • by Daniel Stainback
  • posted May 05, 2016

Quick and simple way to support multi-select using Bootstrap's dropdown component.

jQuery Select Toggle

  • by Daniel Stainback
  • posted February 02, 2016

A snippet to toggle a DOM element based on the value of an select element.

Polymorphic Comments

  • by Daniel Stainback
  • posted November 11, 2015

When going over the data model for commenting, you might consider managing each type of comment separately. This approach would however be repetitive because each comment model would most likely consist of the same data structure. At this point you might consider using a polymorphic relation. This would result in all comments being managed via a single model and thereby eliminating the need for multiple comment models.

User Settings Using Laravel 5 Eloquent Global Scopes

  • by Daniel Stainback
  • posted November 11, 2015

While working with user settings, I noticed that when retrieving a user from the database it was performing two queries. So I decided to play with the Eloquent global scopes to see if I could cut the query down to just one and this is what happened.

10 Useful jQuery Plugins

  • by Daniel Stainback
  • posted April 04, 2013

The quantity and quality of amazingly useful and completely free tools the jQuery developer community has been constantly churning out simply amazes me. I’ve been keeping a list of some great ones that I’ve found lately and I thought I’d share it with you.

CSS3 in all its Glory

  • by Daniel Stainback
  • posted April 04, 2013

While looking for some inspiration on a project that I am currently working on I came across some truly interesting uses of CSS3 and thought I would share.

5 UI Freebies

  • by Daniel Stainback
  • posted May 05, 2012

Whether you're creating a website or mobile app, well designed UI elements are key to a good user experience. Here are a few useful freebies that can help in creating a modern, sleek style.

10 Really High Quality Free Fonts

  • by Daniel Stainback
  • posted March 03, 2012

If you are looking for new interesting fonts, here is a collection of ten beautiful, free and must have fonts for the web and print.