问题:
I'm trying to call a function only if an HTML element is empty, using jQuery. 我正在尝试仅在HTML元素为空时使用jQuery调用函数。
Something like this: 像这样的东西:
if (isEmpty($('#element'))) {
// do something
}
解决方案:
参考一: https://en.stackoom.com/question/SaQl参考二: https://stackoom.com/question/SaQl