LP#1272575 Use getElementById over querySelector
authorJason Etheridge <jason@esilibrary.com>
Fri, 24 Jan 2014 22:51:45 +0000 (17:51 -0500)
committerJeff Godin <jgodin@tadl.org>
Tue, 18 Feb 2014 08:29:09 +0000 (03:29 -0500)
Favor document.getElementById over document.querySelector for simple
by-id element referencing.

Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Jeff Godin <jgodin@tadl.org>
Open-ILS/src/templates/opac/parts/result/table.tt2

index 5994633..0922a70 100644 (file)
@@ -363,10 +363,10 @@ END;
     [% ctx.results_count_header %]
 </div>
 <script>
-resultBlock = document.querySelector('#result_block');
-resultButton = document.querySelector('#return_to_hits');
-facetSidebar = document.querySelector('#facet_sidebar');
-facetButton =  document.querySelector('#refine_hits');
+resultBlock = document.getElementById('result_block');
+resultButton = document.getElementById('return_to_hits');
+facetSidebar = document.getElementById('facet_sidebar');
+facetButton =  document.getElementById('refine_hits');
 function getFacety() {
     resultBlock.setAttribute('class', 'result_block_hidden');
     resultButton.setAttribute('class', 'results_header_btns result_block_visible');