Skip to content

Instantly share code, notes, and snippets.

@wliment
Created May 11, 2015 11:28
Show Gist options
  • Save wliment/dbeb272b1b2c55d3fa80 to your computer and use it in GitHub Desktop.
Save wliment/dbeb272b1b2c55d3fa80 to your computer and use it in GitHub Desktop.
判断对象内容是否为空的jquery 插件 原文链接:https://gist.github.com/laktek/758269
jQuery.isBlank = function (obj) {
if (!obj || $.trim(obj) === "") return true;
if (obj.length && obj.length > 0) return false;
for (var prop in obj) if (obj[prop]) return false;
return true;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment