I have a project with some simple css bar charts. When a bar value updates I call the .animate() jQuery function and use the ‘easeOutBounce’ property provided by the easing plugin. This give my bar a nice bounce to it when the value is updated.
I know this is kinda old but if you haven’t used ColdFusion varScoper then you should give it a try. It will ensure that all your variables are properly scoped. Make sure to note that if will catch variables that are commented out and also any argument variables that are not preceded with “argument” will give a false positive.
With Rails getting a lot of love recently I wanted to give it a shot. One of the first cool things I have found is called render partial. Here are a couple code snippets of what I learned. I am assuming you know a little bit about rails in the first place.
First I made a home controller with a index function. Then I parsed my tumblr rss feed and set a variable called “posts”.
class HomeController < ApplicationController
def index @posts = RSS::Parser.parse(open('http://johngag.tumblr.com/rss').read, false).items
After that I made a partial file called _post.html.erb which outputs the post title and links to the post.
Finally in my index.html.erb view I output the rails magic. In one line of code rails loops through all the posts (or in my case I told it to loop over first 5) and output the posts according to the partial created. This is very DRY (Dont Repeat Yourself) and I love writing less code.