Archive for 'JavaScript'

How to view rendered HTML of React component inside JavaScript console

Assume you have defined a React component that has a render function and assign it to variable someReactComponent. Then you can view the rendered version of the React component inside the JavaScript console by doing the following:

Most Popular In-Demand Programming Languages of 2014

Do you wonder which programming languages are the most popular and in-demand and how they compare with Ruby? Here is a comparison of the following languages: Ruby, Python, Php, Javascript, Scala, Java, Objective-C and C Unfortunately, I had to leave out Go in this comparison since “go” is such a generic term and “golang” didn’t […]

Log to your JavaScript Console from Ruby

You can log to your JavaScript console from Ruby with https://github.com/ConradIrwin/console.log What problems has it solved for you?

Facebook Share and Like Button Customization Issues

My goal was to get a customized Facebook Like button working. Our designer gave us a mockup of a Facebook button which didn’t have the word Like in it, no counter or anything else except the f in a rounded-corner box Facebook logo. It was very difficult to customize it since code you insert into […]

jQuery Makes Writing JavaScript Fun Again

Nick Pink attended the Silicon Valley HTML5 Users Group meeting recently and here are his notes which I am posting with his permission. Last night I went a meetup sponsored by the Silicon Valley HTML5 Users Group called “jQuery Makes Writing JavaScript Fun Again”. The speaker, Dr. Doris Chen of Microsoft, talked specifically about AJAX […]

Easily Replace Prototype and Scriptaculous with JQuery

There is a very cool gem called jquery-rails which provides you one rails generator which will replace your Prototype and Scriptaculous JavaScript libraries with JQuery, within your Rails app. It will download JQuery and install it for you under your public/javascripts directory. I believe this gem only works with Rails 3. I’ve only tested it […]

Extremely Clean Way to Preload all Images

Are your images flickering since you aren’t preloading them? This is kinda annoying. There’s a simple solution. Read below. If you want an extremely clean, DRY, unobtrusive way to preload all images which are defined in your CSS without having to re-specify those urls as arguments into another JavaScript function, check out A New & […]