I'm trying to run a function if a file input type is pdf.
Does anybody know of a way i can validate the file extension with jQuery before hand? thanks
$('.uploadCV').click(function () {
if ($('.html-btn').val() === '.pdf') {
$('.join-us').flip({
direction: 'rl',
color: '#38404b',
speed: 200,
onAnimation: function () {
$('.icon').fadeOut();
$(this).css('margin-top', '20px');
},
content: '<span class="title">Uploading...</span><span class="summary">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>'
})
} else {
console.log('dont upload');
}
});