JQuery check if DOM element exists

linkaiyi
Follow

JQuery check if DOM element exists

var duration = 60000;
            if ($('#id_import_file').get(0)){
                duration = $('#id_import_file')[0].files[0].size / 1024 * 0.01 * 60000;
            }
Object has 0 attachments

Was this article helpful?

This article is viewed 11 times!

Recent Viewed Articles

Related Articles

0 Comments

Leave a Comment

Support