Two options:
$('#accordion li').size(); // the jQuery way
$('#accordion li').length; // the Javascript way, which jQuery uses
Since jQuery calls length under the hood, it’s faster to use that instead of the size() call.
Two options:
$('#accordion li').size(); // the jQuery way
$('#accordion li').length; // the Javascript way, which jQuery uses
Since jQuery calls length under the hood, it’s faster to use that instead of the size() call.