Created
May 11, 2015 11:28
-
-
Save wliment/dbeb272b1b2c55d3fa80 to your computer and use it in GitHub Desktop.
判断对象内容是否为空的jquery 插件
原文链接:https://gist.github.com/laktek/758269
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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