How can we get multiple uploaded files has pdf if yes then enable Div

**case 1:** when I am trying to upload pdf file pdf checkbox is enabled
[![enter image description here](https://i.stack.imgur.com/xRw0U.png)](https://i.stack.imgur.com/xRw0U.png)

**Case 2:** upload docx or any other file checkbox gets hides 
[![ente3:mage description here](https://i.stack.imgur.com/d0C13.png)](https://i.stack.imgur.com/d0C13.png)

**Case 3:** When trying to upload different files such as txt, docx, pdf it is not showing checkbox
[![enter image description here](https://i.stack.imgur.com/7MvgD.png)](https://i.stack.imgur.com/7MvgD.png)

Please suggest how can we check extensions for multiple uploaded files and if there is pdf extension show checkbox div.

```
if (extn == 'pdf' || extn=='PDF') {
  $('#<%=chkAddPdfPassword.ClientID%>').removeAttr('checked');
  $("#chkPdf").show();
} else {
   $("#chkPdf").hide();
   $("#divPasswordField").hide();
}

```

Thanks in Advance