Cache jQuery object to avoid unneeded DOM traversal

This commit is contained in:
Marc Delisle
2011-03-02 13:03:24 -05:00
parent 419d067dc3
commit f07a0842f0

View File

@@ -193,9 +193,9 @@ $(document).ready(function() {
.after(data.sql_query); .after(data.sql_query);
//Remove the empty notice div generated due to a NULL query passed to PMA_showMessage() //Remove the empty notice div generated due to a NULL query passed to PMA_showMessage()
var notice_class = $("#topmenucontainer").next("div").find('.notice'); var $notice_class = $("#topmenucontainer").next("div").find('.notice');
if($(notice_class).text() == '') { if($notice_class.text() == '') {
$(notice_class).remove(); $notice_class.remove();
} }
appendNewUser(data.new_user_string, data.new_user_initial, data.new_user_initial_string); appendNewUser(data.new_user_string, data.new_user_initial, data.new_user_initial_string);