I am making fairly heavy use of jquery ui and jqgrid in the application I am working on. In most examples I see, these controls are accessed using the jquery selector to find the element by
id: $("#elementid")
.
My question is, does jquery provide good enough performance to do this over and over or is it better practice to save references to the elements when they are first accessed:
var elementName = $("#elementid");
and reuse the reference instead?