> For the complete documentation index, see [llms.txt](https://sniperjs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sniperjs.gitbook.io/docs/sniperjs.md).

# SniperJS

**What You Should Already Know**

Before you start studying sniper.js, you should have a basic knowledge of:

* HTML&#x20;
* CSS&#x20;
* JavaScript&#x20;

## About Sniper.js

* SniperJs is a JavaScript Library.
* SniperJs greatly simplifies JavaScript programming.
* SniperJs is very easy to learn.&#x20;

***

### What is SniperJs?

SniperJs  is a lightweight, "code smarter, build faster", JavaScript library.

The purpose of Sniper.js is to make it much easier to use JavaScript on your website.

SniperJs takes a lot of common tasks that require many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a single line of code.

SniperJs also simplifies a lot of the complicated things from JavaScript, like  DOM manipulation, AJAX, Location API, powerful utility functions and many more.

{% code title="snipper.js" overflow="wrap" lineNumbers="true" %}

```javascript
$('.button').addClass("active");
```

{% endcode %}

{% code title="Regulator Javascript" overflow="wrap" lineNumbers="true" %}

```javascript
document.getElementsByClassName("button")[0].classList.add("active")
```

{% endcode %}

### Linking Sniper in your HTML

{% code overflow="wrap" %}

```html
<script src="https://cdn.jsdelivr.net/npm/js-sniper/dist/sniper.min.js"></script>
```

{% endcode %}

* Paste this script tag at the ***end*** of your document body  **`</body>`**
* This tag has to come first before your own script tags

{% code title="index.html" %}

```html
<!DOCTYPE html>
<html lang="en">

<head>
    <title>Test Page</title>
     <link rel="stylesheet" href="style.css">
</head>
<body>
    <h1>Hey there, I'm using SniperJS in this Website</h1>

    <div>
        <input type="checkbox" name="" checked id="cb">
        <textarea name="" id="">Lorem ipsum, dolor sit amet consectetur adipisicing  </textarea>
    </div>

    <script  src="https://cdn.jsdelivr.net/npm/js-sniper/dist/sniper.min.js"></script>
    <script src="myScript.js"></script>
</body>
</html>
```

{% endcode %}

## SniperJS — Code smarter, build faster!!!
