Simple Slide Out Content

This is a super simple CSS example (backed up with just enough JS to show it off), but its still fun. I have a requirement for a specific animation - the team wanted the panel to slide open, but the content to already be there, at normal size in the panel, and they wanted that content to be attached to the side that was sliding.

Nothing fancy. The only real trick is the float-right so that the content is attached to the right side. I could also have looked at something where the content had a negative margin and the that animated so it slid in, or translatedY so it moved in, but that wasn't necessary for this solution.

 


Expressions in a JavaScript Switch Case

Today I stumbled across something I'd never seen before, and at first thought had to be an error - a switch statement with expressions embedded in the case statement:

What the heck is that thing?

 

jsFiddle: Cleaning Copy/Paste Input for ContentEditable

This is captured in an AngularJS directive, but the process could easily be bound with jQuery instead and follow the same steps. The basics here are to stop the default paste, read the paste data as plain text, and then to replace some risky characters (necessary for my exact use case).

As noted, this example has been built for and tested in Chrome only - I know for IE, you need to potentially handle a different getData() operation.

 

Building Pages with a Page Object

I was reading through PHP and MySQL Web Development at the local bookstore the other night when I noticed that their example code for explaining object oriented concepts was a Page class that basically built a page based on its properties. While the concept of directly building the return code string by string is a little foreign to ColdFusion, I was very interested in the idea of an extensible Page object that could help me manage my applications. Read more to see what I came up with.

 

StackCore

I've come up with a .02 version of warpcore using a Java Stack as the event manager, but from simple testing it doesn't seem to be as fast as the previous version. I'm going to have to narrow this down to creation time or execution time though.

Click more to see the code.

 

WarpCore

The name's probably already taken, but what the hell. WarpCore is the name I've given to a very simple implementation of an implicit invocation controller scheme in ColdFusion. The concept is simple: some variable is set that contains an event, the WarpCore handles the registration of new drives (controllers), and the WarpCore controls activating functions in those drives.

 

More Entries

Jon Hartmann, July 2011

I'm Jon Hartmann and I'm a Javascript fanatic, UX/UI evangelist and former ColdFusion master. I blog about mysterious error messages, user interface design questions, and all things baffling and irksome about programming for the web.

Learn more about me on LinkedIn.