Retrofitting old code with JQuery

I had a lot of old code that is full of document.getElementById('foo') in it that I wanted to do JQueryish things to. Luckily JQuery is smart enough to handle them natively:

var my_elem = func_that_returns_eid();
var elem2 = document.getElementById('bar');

Leave A Reply
All content licensed under the Creative Commons License