I know how to off jquery event like this:

```
$("#element").off();

```

but I've function and I need to off my function when window resize.how can I off my `changeBg()` function ?

```js
$(document).ready(function() {

  function changeBg(element) {
    $(element).on("click", function() {
      $(this).css("background", "lightblue");
    })
  }

  changeBg("p");

});
```

```html
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<p>click to change my background</p>
<p>me to!</p>

<button>Make passive</button>
```