> For the complete documentation index, see [llms.txt](https://javascriptuse.gitbook.io/advanced/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://javascriptuse.gitbook.io/advanced/simple-use-jquery-with-typescript-ok.md).

# Simple  use jQuery with TypeScript (ok)

https\://stackoverflow\.com/questions/32050645/how-to-use-jquery-with-typescript

![](https://2726517656-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1E4Gk2ppVKb4olmnun%2F-MRt0W0ieiSP4vgRCoBV%2F-MRt0d_TchcvSNRUM2g7%2FScreenshot_1.jpg?alt=media\&token=b08184a9-6f0a-4809-af9b-735498488760)

```
npm install --save-dev @types/jquery
```

C:\Users\Administrator\Desktop\gulp\es6.tsx

```
class Person {
  constructor(name: string) {
    this.name = name;
  }
  name: string;
}
function greeter(person: Person) {
  return "Hello " + person.name;
}
var person = new Person("Lionel");
$(document).ready(function() {
  var message = greeter(person);
  $("#status")[0].innerHTML = message;
});
```

C:\Users\Administrator\Desktop\gulp\index.html

```
<html>
<head>
   <script src="http://code.jquery.com/jquery-1.8.0.js"></script>
</head>
<body>
<script src="es6.js"></script>
<div id="status"></div>
</body>
</html>
```
