The size() method was removed in jQuery version 3.0. Use the length property instead.