The whole wrapper object returned by the selector
$('.imgDisplay')
could be null. Please check it up. Please see:
http://api.jquery.com/category/selectors/[
^].
The selected element could be not found. You tried to use the
class selector,
http://api.jquery.com/class-selector/[
^].
Make sure the class "imgDisplay" really exist and is used in the attribute of some element(s):
class="imgDisplay"
, without dot. Or use some other, correct selector(s).
—SA