- 'last' ': last-child'
jQuery last . , , , , . id- (.. $("#element-id").last()) , $("#element-id") , jQuery 1. , .
, $("#calling-pad").last().remove(); $("#calling-pad").remove();.
, #calling-pad, , (, <span></span>):
$('#calling-pad').append("<span>9</span>");
, #calling-pad, :
$('#calling-pad > span:last-child').remove();
This finds all spanelements that are direct children #calling-pad, filters to include only the last element (using :last-child), and then removes that element.
source
share