問題:
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