I’m having difficulty with performing a selector operation on an element variable. First I’m selecting my table element in my page using jquery.
var $popup = null;
$popup = $("#popup_List");
<div id="popup" class="popup_block">
<table id="popup_List"><tr><td>Name</td></tr></table>
</div>
I’m trying to perform a selector operation on the $popup variable. The following does not work
$popup("tr:last").after("<tr><td>Name</td></tr");
I’d like to use the variable approach because $("#popup_List") would have to be referenced numerous times in the code otherwise.
$popup.find("tr:last").after("<tr><td>Name</td></tr");