Skip to content
  • home
  • portfolio
  • web design journal
  • blog
    • adventure
    • san diego
    • urbanity & architecture
    • projects
    • website design

Web Dev

Elegantly Run a Function on Window Load or Window Resize

February 27, 2014   |   Web Dev

Pretty straightforward, but I wanted to run a function on the window load event, or if the page was resized (like resizing page elements). I was originally doing this in two lines of code (one for loading, one for resizing), but wanted something more elegant: $(window).on(‘load resize’,functionToRun);

Read More

Three Column List

February 24, 2014   |   Web Dev

The Action: A simple list, with three columns. Other Notes: 1. The middle columns fills the available space, each end column is fixed width. 2. Elements inside each of the columns are centered vertically Example: http://www.localhost:10010/examples/el_list_3columns.html

Read More

Responsive Tiles

January 31, 2014   |   Web Dev

For a couple of projects, I wanted to create tiles that automatically resized themselves based on the screen size, or space available within the page. If there is enough room, I wanted the system to automatically insert another tile to the row. The javascript/jquery: //Resizes tiles to completely fill the width of a container div […]

Read More

Easy jQuery Validator Setup

January 16, 2014   |   Web Dev

It seems like it always takes me a bit to figure out how to get the super-great jquery validator to work, and I have to go work my way through the documentation on the site — which has a lot of information, but makes it a little harder for me to just set it up […]

Read More

Simple Div Popup

January 5, 2014   |   Web Dev

I wanted a simple popup. Click on a link, it opens a div. When you mouse off the div, or the link, it goes away. Pretty easy: The jQuery $(document).ready(function(){ var timer; $(‘.dropdiv-link’).click(function(e){ e.preventDefault(); var target = ‘#’+$(this).attr(‘data-target’); if ($(target).is(“:visible”)){ $(target).hide(); } else{ $(target).show(); } }); $(‘.dropdiv-dropwindow’).mouseover(function(e){ clearTimeout(timer); $(this).show(); }); $(‘.dropdiv-link’).mouseout(function(e){ timer = setTimeout(function(){$(‘.dropdiv-dropwindow’).hide()},500); }); […]

Read More

A SASS Stylesheet For Great Forms

January 3, 2014   |   Web Dev

Forms have always a bit of a pain in the ass to get formatted correctly. One of my largest pet peeves has been making sure that the text given on the label lines up with the text within a textbox. Since padding, margins, font size, and line-heights all play a role in this, any time […]

Read More

Fixed Column on Right, Fluid Column on the Left

December 21, 2013   |   Web Dev

This code produces a 2-column layout, with a fixed column to the right, and a column to the left that fills the remaining space. To change the width of the right column, just adjust anywhere in the code below that has 250px to match whatever width you want (someday we’ll have variables in CSS!). <style> […]

Read More

Fixed Column on Left, Fluid Column on the Right

December 21, 2013   |   Web Dev

A two-column setup, with a fixed width column on the left, and a fluid main column that fills out the rest of the space on the left: <head> <style> .clear{ clear: both; } .col-secondary{ float: left; width: 190px; background: blue; min-height: 100px; } .col-main{ margin-left: 200px; box-sizing: border-box; background: green; min-height: 200px; } </style> </head> […]

Read More

HTML and Encoded Characters with Handlebars

September 14, 2013   |   Web Dev

As soon as I updated some of the templating on one of my websites to handlebars, HTML code wasn’t being rendered, and I recieved odd characters in the output, like:   My Blog Name &raquo; Blog Sub Title The solution to this is instead of using the standard double bracket to insert the content, use triple brackets […]

Read More

Making an Entire Div Clickable

February 23, 2013   |   Web Dev

I wanted to make an entire div clickable — the destination for the click is derived from a link within the div that we give a class of ‘main_link’ to. Insert the following jquery code into your page: $(“.stndBox”).click(function(){ window.location=$(this).find(“.main_link”).attr(“href”); }); Your html code will look like the code below. The jquery will grab the […]

Read More

Posts navigation

Older posts
Newer posts

drempd | san diego, ca


home contact

adventures san diego urbanity and architecture projects stream website design

portfolio resume san diego web design freelance web designer

custom web design responsive web design website maintenance