SyntaxFix
Write A Post
Hire A Developer
Questions
You can use the is function
if( $('#cartContent').is(':empty') ) { }
or use the length
if( $('#cartContent:empty').length ) { }