Javascript function fails to return element
问题 So I'm working with the Handsontable jQuery plugin for a project at the moment, and I've written some custom functions to work with it. The function I'm currently having trouble with is one I've written to return the currently selected cell(when the user has only selected one, not multiple, and yes that is checked for). Here is my code: function getCurrentCell(){ var selection = $('div.current'); var left = selection.offset().left; var right = left + selection.width(); var top = selection