Joined September 2012
·

Jared Williams

Boston
·
·
·

I personally would very much prefer to use plain old JavaScript for selecting child elements 'p' of an element #id. I would also recommend doing it this way as well, especially after having added a couple more tests to the jsperf and seeing just how extremely much faster it is to do what I told my friend I'd do instead by default. http://jsperf.com/wtfasdasdasd/5

var p = document.getElementById('id').getElementsByTagName('p');
$(p);

Plus, you can set it to a variable which can be passed to jQuery for selecting it and using it's context.

Achievements
132 Karma
0 Total ProTip Views