# Kotlin(JavaScript ) extension function to JQuery class

**URL:** <https://discuss.kotlinlang.org/t/kotlin-javascript-extension-function-to-jquery-class/613>\
**Category:** Uncategorized\
**Created:** [March 26, 2014, 5:08pm UTC](https://discuss.kotlinlang.org/t/kotlin-javascript-extension-function-to-jquery-class/613 "2014-03-26T17:08:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![OZKA](https://avatars.discourse-cdn.com/v4/letter/o/5daacb/32.png) [@OZKA](https://discuss.kotlinlang.org/u/OZKA)\
**Post date:** [March 26, 2014, 5:08pm UTC](https://discuss.kotlinlang.org/t/kotlin-javascript-extension-function-to-jquery-class/613/1 "2014-03-26T17:08:25Z")

</div>

The class JQuery contain some useful functions from this library, but very small set of them. Is where a way to add other jquery functions in to JQuery class by using extension functions or something over way? The code below do not work:

```kotlin
//Uncaught ReferenceError: noImpl is not defined:
   /*fun JQuery.hide(): JQuery {js.noImpl;
        return this;
    }*/

  //event.returnValue is deprecated. Please use the standard event.preventDefault() instead.
  fun JQuery.hide() : JQuery = this
```

**upd:** sorry, but i’m found solution, this works fine:

```kotlin
native public fun JQuery.hide() : JQuery = js.noImpl
```
