Page is a not externally linkable
- Code, Content, and Presentation
-- JavaScript and AJAX
---- Question about jQuery selector lookup performance.


daveVk - 12:44 am on May 30, 2012 (gmt 0)


If jQuery assumes id's are unique, it is likely to reduce $('#workorder-form #sa-table-1 tr #wi-UnitPrice') to $('#wi-UnitPrice'), that is ignore all prior to last hash.

Validating HTML better idea ?

Alternatively you could break the expression up

eg
var wform = $('#workorder-form');
var saTable = wform.find('#sa-table-1');
etc
there may be some time advantage here if there are multiple elements to identify within saTable


Thread source:: http://www.webmasterworld.com/javascript/4459043.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com