org.querki.jquery

JQuery

trait JQuery extends Object

A facade for the main jQuery object.

This is a reimplementation, very loosely based on the existing scalajs-jquery. It aims to be much more strongly and precisely typed, while being as literal a translation of the functionality of jQuery as possible. It is intentionally pretty close to scalajs-jquery, and many files can be switched over by simply switching the import, but compatibility has *not* been a priority, and a modest number of functions have changed in breaking ways. (This is one reason why I treated this as a rewrite rather than as an evolution of the existing library.)

TODO: as of this writing, this is *quite* incomplete; I am only adding functions as I use them, and at least half of them are currently missing. Pull requests are greatly welcomed. In particular, we are lacking many overloads -- I've added some of them, but many jQuery functions have a considerable number of potential overloads.

Many parameters are polymorphic. We often use | (type union) to define these, but | and UndefOr don't mix, so we often have to spell things out in more detail. Also, you can't use a js.Function or js.ThisFunction in a | expression, because it interferes with the compiler's implicit conversion from a Scala function to a js.Function. Note that there are several common unions such as Selector defined in package.scala.

Things are also often spelled out more explicitly than you might expect, because Scala restricts us to one overload per method with default parameters; this limits our usage of UndefOr.

We don't necessarily spell out every possible overload here, although we've made a serious effort to make every version of the JS calls possible. In some cases, we only have versions that involve some extra parameters. If you find yourself really wanting an overload that takes fewer parameters, pull requests are welcome.

NOTE: discussion on scalajs Gitter, 1/28/15, says that facades should *return* Any, but *take* js.Any *if* the Javascript is going to process the value in any way. This is the guiding principle here.

Also: when a facade function takes a property bag, if it is understood to be name/value pairs in JS, declare it as js.Dictionary[T]. Often, we can constrain T; if not, just put js.Any, and it is at least explicit that it is name/value pairs.

Long-deprecated functions are, by and large, simply omitted. Please see the jQuery documentation to see what to use instead.

Annotations
@RawJSType() @native()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JQuery
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def add(selector: String, context: Element): JQuery

  7. def add(selector: ElementDesc): JQuery

    Create a new jQuery object with elements added to the set of matched elements.

  8. def addBack(selector: String = ???): JQuery

    Add the previous set of elements on the stack to the current set, optionally filtered by a selector.

  9. def addClass(func: ThisFunction2[Element, Int, String, String]): JQuery

  10. def addClass(classNames: String): JQuery

    Adds the specified class(es) to each of the set of matched elements.

  11. def after(func: ThisFunction1[Element, Int, ElementDesc]): JQuery

  12. def after(func: ThisFunction0[Element, ElementDesc]): JQuery

  13. def after(content: ElementDesc*): JQuery

    Insert content, specified by the parameter, after each element in the set of matched elements.

  14. def ajaxComplete(handler: Function3[JQueryEventObject, JQueryXHR, JQueryAjaxSettings, Any]): JQuery

    Register a handler to be called when Ajax requests complete.

  15. def ajaxError(handler: Function4[JQueryEventObject, JQueryXHR, JQueryAjaxSettings, String, Any]): JQuery

    Register a handler to be called when Ajax requests complete with an error.

  16. def ajaxSend(handler: Function3[JQueryEventObject, JQueryXHR, JQueryAjaxSettings, Any]): JQuery

    Attach a function to be executed before an Ajax request is sent.

  17. def ajaxStart(handler: Function0[Any]): JQuery

    Register a handler to be called when the first Ajax request begins.

  18. def ajaxStop(handler: Function0[Any]): JQuery

    Register a handler to be called when all Ajax requests have completed.

  19. def ajaxSuccess(handler: Function4[JQueryEventObject, JQueryXHR, JQueryAjaxSettings, Object, Any]): JQuery

    Attach a function to be executed whenever an Ajax request completes successfully.

  20. def animate(properties: Dictionary[Any], options: JQueryAnimationSettings): JQuery

  21. def animate(properties: Dictionary[Any], duration: |[Number, String], easing: String = ???, complete: ThisFunction0[Element, Any] = ???): JQuery

    Perform a custom animation of a set of CSS properties.

  22. def append(func: ThisFunction2[Element, Int, String, Any]): JQuery

  23. def append(content: ElementDesc*): JQuery

    Insert content, specified by the parameter, to the end of each element in the set of matched elements.

  24. def appendTo(target: ElementDesc): JQuery

    Insert every element in the set of matched elements to the end of the target.

  25. def apply(x: Int): Element

    Shorthand for get(x), lifted from scalajs-jquery

    Shorthand for get(x), lifted from scalajs-jquery

    Annotations
    @JSBracketAccess()
  26. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  27. def attr(attributeName: String, func: ThisFunction2[Element, Int, String, AttrVal]): JQuery

  28. def attr(attributeName: String, v: AttrVal): JQuery

    Set an attribute for the set of matched elements.

  29. def attr(attributes: Dictionary[String]): JQuery

  30. def attr(attributeName: String): UndefOr[String]

    Get the value of an attribute for the first element in the set of matched elements.

    Get the value of an attribute for the first element in the set of matched elements.

    Note that this returns UndefOr -- it is entirely legal for this to return undefined if the attribute is not present, and that causes things to crash if it is not UndefOr.

  31. def before(func: ThisFunction2[Element, Integer, String, |[|[String, Element], JQuery]]): JQuery

  32. def before(content: ElementDesc, addlContent: ElementDesc*): JQuery

    Insert content, specified by the parameter, before each element in the set of matched elements.

  33. def bind(events: Dictionary[ThisFunction1[Element, JQueryEventObject, Any]]): JQuery

  34. def bind(eventType: String, preventBubble: Boolean): JQuery

  35. def bind(eventType: String, eventData: Any, handler: ThisFunction1[Element, JQueryEventObject, Any]): JQuery

  36. def bind(eventType: String, handler: ThisFunction1[Element, JQueryEventObject, Any]): JQuery

    Attach a handler to an event for the elements.

  37. def blur(eventData: Any, handler: EventHandler): JQuery

  38. def blur(handler: EventHandler): JQuery

  39. def blur(): JQuery

    Bind an event handler to the "blur" JavaScript event, or trigger that event on an element.

  40. def change(eventData: Any, handler: EventHandler): JQuery

  41. def change(handler: EventHandler): JQuery

  42. def change(): JQuery

    Bind an event handler to the "change" JavaScript event, or trigger that event on an element.

    Bind an event handler to the "change" JavaScript event, or trigger that event on an element.

    NOTE: the jQuery documentation is very fuzzy on this point, but implies in an example that "this" gets set appropriately.

  43. def children(selector: String = ???): JQuery

    Get the children of each element in the set of matched elements, optionally filtered by a selector.

  44. def clearQueue(queueName: String = ???): JQuery

    Remove from the queue all items that have not yet been run.

  45. def click(handler: EventHandler): JQuery

  46. def click(): JQuery

    Bind an event handler to the "click" JavaScript event, or trigger that event on an element.

    Bind an event handler to the "click" JavaScript event, or trigger that event on an element.

    This is the simpler version, and usually what you want.

  47. def clone(withDataAndEvents: Boolean, deepWithDataAndEvents: Boolean): JQuery

  48. def clone(withDataAndEvents: Boolean): JQuery

  49. def clone(): JQuery

    Create a deep copy of the set of matched elements.

    Create a deep copy of the set of matched elements.

    Note that this requires an override because Scala.Object declares a clone() method which is entirely unrelated.

    Definition Classes
    JQuery → AnyRef
  50. def closest(selector: String, context: Element): JQuery

  51. def closest(selector: |[|[String, Element], JQuery]): JQuery

    For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.

  52. def contents(): JQuery

    Get the children of each element in the set of matched elements, including text and comment nodes.

  53. def css(properties: Dictionary[Any]): JQuery

  54. def css(propertyName: String, value: |[String, Int]): JQuery

  55. def css(propertyNames: Array[String]): Dictionary[String]

  56. def css(propertyName: String): String

    Get the computed style properties for the first element in the set of matched elements.

  57. def data(): Dictionary[Any]

    Calling .

    Calling .data() with no parameters retrieves all of the values as a JavaScript object. This object can be safely cached in a variable as long as a new object is not set with .data(obj). Using the object directly to get or set values is faster than making individual calls to .data() to get or set each value.

  58. def data(key: String): UndefOr[Any]

    Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute.

    Return the value at the named data store for the first element in the jQuery collection, as set by data(name, value) or by an HTML5 data-* attribute. Undefined if that key is not set.

  59. def data(obj: Dictionary[Any]): JQuery

  60. def data(key: String, value: Any): JQuery

    Store arbitrary data associated with the matched elements.

    Store arbitrary data associated with the matched elements.

    undefined is not recognised as a data value. Calls such as .data( "name", undefined ) will return the corresponding data for "name", and is therefore the same as .data( "name" ).

  61. def dblclick(eventData: Any, handler: EventHandler): JQuery

  62. def dblclick(handler: EventHandler): JQuery

  63. def dblclick(): JQuery

    Bind an event handler to the "dblclick" JavaScript event.

  64. def delay(duration: Int, queueName: String = ???): JQuery

    Set a timer to delay execution of subsequent items in the queue.

  65. def dequeue(queueName: String = ???): JQuery

    Execute the next function on the queue for the matched elements.

  66. def detach(selector: String): JQuery

  67. def detach(): JQuery

    Remove the set of matched elements from the DOM.

  68. def each(func: ThisFunction1[Element, Int, Any]): JQuery

  69. def each(func: ThisFunction0[Element, Any]): JQuery

    Iterate over a jQuery object, executing a function for each matched element.

    Iterate over a jQuery object, executing a function for each matched element.

    Note that we do not bother with the full jQuery signature, since the "element" parameter simply matches "this".

    You can stop the loop from within the callback function by returning false. Otherwise, the return value is irrelevant.

  70. def empty(): JQuery

    Remove all child nodes of the set of matched elements from the DOM.

  71. def end(): JQuery

    End the most recent filtering operation in the current chain and return the set of matched elements to its previous state.

  72. def eq(index: Integer): JQuery

    Reduce the set of matched elements to the one at the specified index.

  73. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  74. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  75. def fadeIn(options: JQueryAnimationSettings): JQuery

  76. def fadeIn(duration: |[Number, String], easing: String = ???, complete: ThisFunction0[Element, Any] = ???): JQuery

  77. def fadeIn(easing: String, complete: ThisFunction0[Element, Any]): JQuery

  78. def fadeIn(easing: String): JQuery

  79. def fadeIn(): JQuery

    Display the matched elements by fading them to opaque.

  80. def fadeOut(options: JQueryAnimationSettings): JQuery

  81. def fadeOut(duration: |[Number, String], easing: String = ???, complete: ThisFunction0[Element, Any] = ???): JQuery

  82. def fadeOut(easing: String, complete: ThisFunction0[Element, Any]): JQuery

  83. def fadeOut(easing: String): JQuery

  84. def fadeOut(): JQuery

    Hide the matched elements by fading them to transparent.

  85. def fadeTo(duration: |[String, Number], opacity: Number, easing: String = ???, complete: ThisFunction0[Element, Any] = ???): JQuery

    Adjust the opacity of the matched elements.

  86. def fadeToggle(options: JQueryAnimationSettings): JQuery

  87. def fadeToggle(duration: |[Number, String], easing: String = ???, complete: ThisFunction0[Element, Any] = ???): JQuery

  88. def fadeToggle(easing: String, complete: ThisFunction0[Element, Any]): JQuery

  89. def fadeToggle(easing: String): JQuery

  90. def fadeToggle(): JQuery

    Display or hide the matched elements by animating their opacity.

  91. def filter(func: ThisFunction1[Element, Int, Boolean]): JQuery

  92. def filter(func: ThisFunction0[Element, Boolean]): JQuery

  93. def filter(selector: Selector): JQuery

    Reduce the set of matched elements to those that match the selector or pass the function's test.

  94. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  95. def find(selector: Selector): JQuery

    Get the descendants of each element in the current set of matched elements, filtered by a selector, jQuery object, or element.

  96. def finish(queue: String = "fx"): JQuery

    Stop the currently-running animation, remove all queued animations, and complete all animations for the matched elements.

  97. def first(): JQuery

    Reduce the set of matched elements to the first in the set.

  98. def focus(eventData: Any, handler: EventHandler): JQuery

  99. def focus(handler: EventHandler): JQuery

  100. def focus(): JQuery

    Bind an event handler to the "focus" JavaScript event, or trigger that event on an element.

  101. def focusin(eventData: Any, handler: EventHandler): JQuery

  102. def focusin(handler: EventHandler): JQuery

  103. def focusin(): JQuery

    Bind an event handler to the "focusin" event.

  104. def focusout(eventData: Any, handler: EventHandler): JQuery

  105. def focusout(handler: EventHandler): JQuery

  106. def focusout(): JQuery

    Bind an event handler to the "focusout" event.

  107. def get(): Array[_]

    Retrieve the elements matched by the jQuery object.

  108. def get(index: Int): UndefOr[Element]

    Retrieve one of the elements matched by the jQuery object.

    Retrieve one of the elements matched by the jQuery object.

    If the value of index is out of bounds - less than the negative number of elements or equal to or greater than the number of elements - it returns undefined.

  109. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  110. def has(selector: Selector): JQuery

    Reduce the set of matched elements to those that have a descendant that matches the selector or DOM element.

  111. def hasClass(className: String): Boolean

    Determine whether any of the matched elements are assigned the given class.

  112. def hasOwnProperty(v: String): Boolean

    Definition Classes
    Object
  113. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  114. def height(value: ThisFunction2[Element, Integer, Integer, |[Number, String]]): JQuery

  115. def height(value: |[Double, String]): JQuery

    Set the CSS height of every matched element.

  116. def height(): Double

    Get the current computed height for the first element in the set of matched elements.

  117. def hide(duration: |[String, Int], easing: String = ???, complete: Function = ???): JQuery

  118. def hide(duration: |[String, Int], complete: Function): JQuery

  119. def hide(): JQuery

    Hide the matched elements.

  120. def hover(handlerInOut: EventHandler): JQuery

    Bind a single handler to the matched elements, to be executed when the mouse pointer enters or leaves the elements.

  121. def hover(handlerIn: EventHandler, handlerOut: EventHandler): JQuery

    Bind two handlers to the matched elements, to be executed when the mouse pointer enters and leaves the elements.

  122. def html(func: ThisFunction2[Element, Int, String, String]): JQuery

  123. def html(t: String): JQuery

    Set the HTML contents of every matched element.

  124. def html(): String

    Get the HTML contents of the first element in the set of matched elements.

  125. def index(selector: ElementDesc): Int

  126. def index(): Int

    Search for a given element from among the matched elements.

  127. def innerHeight(): Double

    Get the current computed inner height (including padding but not border) for the first element in the set of matched elements.

  128. def innerWidth(): Double

    Get the current computed inner width (including padding but not border) for the first element in the set of matched elements.

  129. def insertAfter(target: ElementDesc): JQuery

    Insert every element in the set of matched elements after the target.

  130. def insertBefore(target: ElementDesc): JQuery

    Insert every element in the set of matched elements before the target.

  131. def is(func: ThisFunction1[Element, Int, Boolean]): Boolean

    Note that this overload doesn't precisely match the jQuery documentation; we elide the redundant Element param, since you have Element as the this parameter.

  132. def is(selector: Selector): Boolean

    Check the current matched set of elements against a selector, element, or jQuery object and return true if at least one of these elements matches the given arguments.

  133. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  134. def isPrototypeOf(v: Object): Boolean

    Definition Classes
    Object
  135. def jquery: String

    A string containing the jQuery version number.

  136. def keydown(): JQuery

  137. def keydown(eventData: Any, handler: EventHandler): JQuery

  138. def keydown(handler: EventHandler): JQuery

    Bind an event handler to the "keydown" JavaScript event, or trigger that event on an element.

  139. def keypress(): JQuery

  140. def keypress(eventData: Any, handler: EventHandler): JQuery

  141. def keypress(handler: EventHandler): JQuery

    Bind an event handler to the "keypress" JavaScript event, or trigger that event on an element.

  142. def keyup(): JQuery

  143. def keyup(eventData: Any, handler: EventHandler): JQuery

  144. def keyup(handler: EventHandler): JQuery

    Bind an event handler to the "keyup" JavaScript event, or trigger that event on an element.

  145. def last(): JQuery

    Reduce the set of matched elements to the final one in the set.

  146. def length: Int

    The number of elements in the jQuery object.

  147. def load(url: String, data: |[String, Object], complete: ThisFunction3[Element, String, String, JQueryXHR, Any]): JQuery

  148. def load(url: String, data: |[String, Object]): JQuery

  149. def load(url: String): JQuery

    Load data from the server and place the returned HTML into the matched element.

  150. def map(func: ThisFunction1[Element, Int, Any]): JQuery

  151. def map(func: ThisFunction0[Element, Any]): JQuery

    Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.

    Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.

    For Scala code, it is often more convenient to use the mapElems() extension function.

    Within the callback function, this refers to the current DOM element for each iteration. The function can return an individual data item or an array of data items to be inserted into the resulting set.

    If a js.Array is returned, the elements inside the array are inserted into the set. If the function returns null or undefined, no element will be inserted. (Note the implication: this doesn't quite match the usual Scala semantics of map() -- there is a flatten component as well.)

  152. def mousedown(eventData: Any, handler: EventHandler): JQuery

  153. def mousedown(handler: EventHandler): JQuery

  154. def mousedown(): JQuery

    Bind an event handler to the "mousedown" JavaScript event, or trigger that event on an element.

  155. def mouseenter(eventData: Any, handler: EventHandler): JQuery

  156. def mouseenter(handler: EventHandler): JQuery

  157. def mouseenter(): JQuery

    Bind an event handler to the "mouseenter" JavaScript event, or trigger that event on an element.

  158. def mouseleave(eventData: Any, handler: EventHandler): JQuery

  159. def mouseleave(handler: EventHandler): JQuery

  160. def mouseleave(): JQuery

    Bind an event handler to the "mouseleave" JavaScript event, or trigger that event on an element.

  161. def mousemove(eventData: Any, handler: EventHandler): JQuery

  162. def mousemove(handler: EventHandler): JQuery

  163. def mousemove(): JQuery

    Bind an event handler to the "mousemove" JavaScript event, or trigger that event on an element.

  164. def mouseout(eventData: Any, handler: EventHandler): JQuery

  165. def mouseout(handler: EventHandler): JQuery

  166. def mouseout(): JQuery

    Bind an event handler to the "mouseout" JavaScript event, or trigger that event on an element.

  167. def mouseover(eventData: Any, handler: EventHandler): JQuery

  168. def mouseover(handler: EventHandler): JQuery

  169. def mouseover(): JQuery

    Bind an event handler to the "mouseover" JavaScript event, or trigger that event on an element.

  170. def mouseup(eventData: Any, handler: EventHandler): JQuery

  171. def mouseup(handler: EventHandler): JQuery

  172. def mouseup(): JQuery

    Bind an event handler to the "mouseup" JavaScript event, or trigger that event on an element.

  173. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  174. def next(selector: String = ???): JQuery

    Get the immediately following sibling of each element in the set of matched elements.

    Get the immediately following sibling of each element in the set of matched elements. If a selector is provided, it retrieves the next sibling only if it matches that selector.

  175. def nextAll(selector: String = ???): JQuery

    Get all following siblings of each element in the set of matched elements, optionally filtered by a selector.

  176. def nextUntil(element: |[Element, JQuery], filter: String = ???): JQuery

  177. def nextUntil(selector: String, filter: String): JQuery

  178. def nextUntil(selector: String): JQuery

  179. def nextUntil(): JQuery

    Get all following siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object passed.

  180. def not(func: ThisFunction2[Element, Integer, Element, Boolean]): JQuery

  181. def not(selector: ElementDesc): JQuery

    Remove elements from the set of matched elements.

  182. final def notify(): Unit

    Definition Classes
    AnyRef
  183. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  184. def off(): JQuery

  185. def off(event: JQueryEventObject): JQuery

  186. def off(eventsMap: Dictionary[EventHandler], selector: String = ???): JQuery

  187. def off(events: String, handler: EventHandler): JQuery

  188. def off(events: String, selector: String, handler: EventHandler): JQuery

  189. def off(events: String, selector: String): JQuery

  190. def off(events: String): JQuery

    Remove an event handler.

  191. def offset(func: Function2[Integer, JQueryPosition, JQueryPosition]): JQuery

  192. def offset(coordinates: JQueryPosition): JQuery

  193. def offset(): JQueryPosition

    Get the current coordinates of the first element in the set of matched elements, relative to the document.

  194. def offsetParent(): JQuery

    Get the closest ancestor element that is positioned.

  195. def on(eventsMap: Dictionary[EventHandler]): JQuery

  196. def on(eventsMap: Dictionary[EventHandler], selector: String): JQuery

  197. def on(eventsMap: Dictionary[EventHandler], selector: String, data: Any): JQuery

  198. def on(events: String): JQuery

  199. def on(events: String, turnOff: Boolean): JQuery

  200. def on(events: String, selector: String): JQuery

  201. def on(events: String, selector: String, data: Any): JQuery

  202. def on(events: String, selector: String, data: Any, turnOff: Boolean): JQuery

    Attach an event handler function for one or more events to the selected elements.

    Attach an event handler function for one or more events to the selected elements.

    This version of the signature allows you to pass in "false" as the handler. This is kind of magical in jQuery -- it is shorthand for a function that just does "return false", which stops propagation on the event. Note that true is *not* a legal value, only false.

  203. def on(events: String, handler: Function3[JQueryEventObject, Any, Any, Any]): JQuery

  204. def on(events: String, handler: Function2[JQueryEventObject, Any, Any]): JQuery

  205. def on(events: String, handler: ThisFunction3[Element, JQueryEventObject, Any, Any, Any]): JQuery

  206. def on(events: String, handler: ThisFunction2[Element, JQueryEventObject, Any, Any]): JQuery

  207. def on(events: String, handler: EventHandler): JQuery

  208. def on(events: String, selector: String, data: Any, handler: EventHandler): JQuery

    Attach an event handler function for one or more events to the selected elements.

    Attach an event handler function for one or more events to the selected elements.

    Note that this contains overloads for up to 2 "extra" parameters to the handler, but the number is potentially unlimited. If we ever care about more, we could add them.

    IMPORTANT: this first signature allows you to specify a sub-selector, and some data to pass. There data parameter is *not* optional -- you must pass something in order for the compiler to pick it up! (At least, put in js.undefined there.) For example, something like:

    $("body").on("click", ".element", js.undefined, { (elem:Element, evt:JQueryEventObject) => {...} )

    We can't write jQuery's (String, String, ThingFunction1) version of the signature here, because it conflicts with the (String, String, Any) version further down, which does something very different. (jQuery is sometimes too clever for its own good.)

    So remember to pass something for the data parameter, in order to get the compiler to do the right thing. If you don't, your function *will* match the (String, String, Any) version of the signature, but it won't work correctly.

  209. def one(eventsMap: Dictionary[EventHandler]): JQuery

  210. def one(eventsMap: Dictionary[EventHandler], selector: String): JQuery

  211. def one(eventsMap: Dictionary[EventHandler], selector: String, data: Any): JQuery

  212. def one(events: String): JQuery

  213. def one(events: String, turnOff: Boolean): JQuery

  214. def one(events: String, selector: String): JQuery

  215. def one(events: String, selector: String, data: Any): JQuery

  216. def one(events: String, selector: String, data: Any, turnOff: Boolean): JQuery

  217. def one(events: String, handler: Function3[JQueryEventObject, Any, Any, Any]): JQuery

  218. def one(events: String, handler: Function2[JQueryEventObject, Any, Any]): JQuery

  219. def one(events: String, handler: ThisFunction3[Element, JQueryEventObject, Any, Any, Any]): JQuery

  220. def one(events: String, handler: ThisFunction2[Element, JQueryEventObject, Any, Any]): JQuery

  221. def one(events: String, handler: EventHandler): JQuery

  222. def one(events: String, selector: String, data: Any, handler: EventHandler): JQuery

    Attach a handler to an event for the elements.

    Attach a handler to an event for the elements. The handler is executed at most once per element per event type.

  223. def outerHeight(includeMargin: Boolean): Double

  224. def outerHeight(): Double

    Get the current computed height for the first element in the set of matched elements, including padding, border, and optionally margin.

  225. def outerWidth(includeMargin: Boolean): Double

  226. def outerWidth(): Double

    Get the current computed width for the first element in the set of matched elements, including padding, border, and optionally margin.

  227. def parent(): JQuery

  228. def parent(selector: String): JQuery

    Get the parent of each element in the current set of matched elements, optionally filtered by a selector.

    Get the parent of each element in the current set of matched elements, optionally filtered by a selector.

    TBD: is the parameter really a Selector, or just a String? The JQuery API docs are unclear.

  229. def parents(): JQuery

  230. def parents(selector: String): JQuery

    Get the ancestors of each element in the current set of matched elements, optionally filtered by a selector.

  231. def parentsUntil(element: |[Element, JQuery], filter: String = ???): JQuery

  232. def parentsUntil(selector: String, filter: String): JQuery

  233. def parentsUntil(selector: String): JQuery

  234. def parentsUntil(): JQuery

    Get the ancestors of each element in the current set of matched elements, up to but not including the element matched by the selector, DOM node, or jQuery object.

  235. def position(): JQueryPosition

    Get the current coordinates of the first element in the set of matched elements, relative to the offset parent.

  236. def prepend(func: ThisFunction2[Element, Int, String, Selector]): JQuery

  237. def prepend(contents: ElementDesc*): JQuery

    Insert content, specified by the parameters, to the beginning of each element in the set of matched elements.

  238. def prependTo(target: ElementDesc): JQuery

    Insert every element in the set of matched elements to the beginning of the target.

  239. def prev(selector: UndefOr[String] = js.undefined): JQuery

    Get the immediately preceding sibling of each element in the set of matched elements, optionally filtered by a selector.

  240. def prevAll(selector: UndefOr[String] = js.undefined): JQuery

    Get all preceding siblings of each element in the set of matched elements, optionally filtered by a selector.

  241. def prevUntil(element: |[Element, JQuery], filter: String = ???): JQuery

  242. def prevUntil(selector: String, filter: String): JQuery

  243. def prevUntil(selector: String): JQuery

  244. def prevUntil(): JQuery

    Get all preceding siblings of each element up to but not including the element matched by the selector, DOM node, or jQuery object.

  245. def promise(tpe: String = ???, target: Object = ???): JQueryPromise

    Return a Promise object to observe when all actions of a certain type bound to the collection, queued or not, have finished.

  246. def prop(propertyName: String, func: ThisFunction2[Element, Int, Any, Any]): JQuery

  247. def prop(properties: Dictionary[Any]): JQuery

  248. def prop(propertyName: String, value: Any): JQuery

    Set one or more properties for the set of matched elements.

  249. def prop(propertyName: String): UndefOr[Any]

    Get the value of a property for the first element in the set of matched elements.

  250. def propertyIsEnumerable(v: String): Boolean

    Definition Classes
    Object
  251. def pushStack(elements: Array[Element], name: String, arguments: Array[Any]): JQuery

  252. def pushStack(elements: Array[Element]): JQuery

    Add a collection of DOM elements onto the jQuery stack.

  253. def queue(callback: Function1[Function0[Any], Any]): JQuery

  254. def queue(queueName: String, newQueue: Array[Function]): JQuery

  255. def queue(newQueue: Array[Function]): JQuery

  256. def queue(queueName: String = ???): Array[Function]

    Show the queue of functions to be executed on the matched elements.

  257. def ready(handler: Function0[Any]): JQuery

    Specify a function to execute when the DOM is fully loaded.

  258. def remove(childSelector: String): JQuery

  259. def remove(): JQuery

    Remove the set of matched elements from the DOM.

  260. def removeAttr(attributeName: String): JQuery

    Remove an attribute from each element in the set of matched elements.

  261. def removeClass(func: ThisFunction2[Element, Int, String, String]): JQuery

  262. def removeClass(classNames: String): JQuery

  263. def removeClass(): JQuery

    Remove a single class, multiple classes, or all classes from each element in the set of matched elements.

  264. def removeData(list: Array[String]): JQuery

  265. def removeData(name: String): JQuery

  266. def removeData(): JQuery

    Remove a previously-stored piece of data.

  267. def removeProp(propertyName: String): JQuery

    Remove a property for the set of matched elements.

  268. def replaceAll(target: ElementDesc): JQuery

    Replace each target element with the set of matched elements.

  269. def replaceWith(func: ThisFunction0[Element, ElementDesc]): JQuery

  270. def replaceWith(content: ElementDesc): JQuery

    Replace each element in the set of matched elements with the provided new content and return the set of elements that was removed.

  271. def resize(): JQuery

  272. def resize(eventData: Any, handler: EventHandler): JQuery

  273. def resize(func: EventHandler): JQuery

    Bind an event handler to the "resize" JavaScript event, or trigger that event on an element.

  274. def scroll(eventData: Any, handler: EventHandler): JQuery

  275. def scroll(handler: EventHandler): JQuery

  276. def scroll(): JQuery

    Bind an event handler to the "scroll" JavaScript event, or trigger that event on an element.

  277. def scrollLeft(value: |[Double, Integer]): JQuery

  278. def scrollLeft(): Integer

    Get the current horizontal position of the scroll bar for the first element in the set of matched elements.

  279. def scrollTop(value: |[Double, Integer]): JQuery

    Set the current vertical position of the scroll bar for each of the set of matched elements.

    Set the current vertical position of the scroll bar for each of the set of matched elements.

    Note that this intentionally takes Double -- while you usually want to set it to an Int, there are occasions when being able to take a Double (that is, a full JS Number) is convenient in code.

  280. def scrollTop(): Int

    Get the current vertical position of the scroll bar for the first element in the set of matched elements or set the vertical position of the scroll bar for every matched element.

  281. def select(eventData: Any, handler: EventHandler): JQuery

  282. def select(handler: EventHandler): JQuery

  283. def select(): JQuery

    Bind an event handler to the "select" JavaScript event, or trigger that event on an element.

  284. def serialize(): String

    Encode a set of form elements as a string for submission.

  285. def serializeArray(): Array[JQuerySerializeArrayElement]

    Encode a set of form elements as an array of names and values.

  286. def show(duration: |[String, Int], easing: String = ???, complete: Function = ???): JQuery

  287. def show(duration: |[String, Int], complete: Function): JQuery

  288. def show(): JQuery

    Hide the matched elements.

  289. def siblings(selector: String = ???): JQuery

    Get the siblings of each element in the set of matched elements, optionally filtered by a selector.

  290. def slice(start: Integer, end: Integer = ???): JQuery

    Reduce the set of matched elements to a subset specified by a range of indices.

  291. def slideDown(duration: |[String, Int], complete: Function = ???): JQuery

  292. def slideDown(): JQuery

    Display the matched elements with a sliding motion.

  293. def slideToggle(options: JQueryAnimationSettings): JQuery

  294. def slideToggle(duration: |[Number, String], easing: String = "swing", complete: ThisFunction0[Element, Any] = ???): JQuery

  295. def slideToggle(): JQuery

    Display or hide the matched elements with a sliding motion.

  296. def slideUp(duration: |[String, Int], complete: Function = ???): JQuery

  297. def slideUp(): JQuery

    Hide the matched elements with a sliding motion.

  298. def stop(queue: String, clearQueue: Boolean = false, jumpToEnd: Boolean = false): JQuery

  299. def stop(clearQueue: Boolean, jumpToEnd: Boolean): JQuery

  300. def stop(clearQueue: Boolean): JQuery

  301. def stop(): JQuery

    Stop the currently-running animation on the matched elements.

  302. def submit(eventData: Any, handler: ThisFunction1[Element, JQueryEventObject, Any]): JQuery

  303. def submit(handler: ThisFunction1[Element, JQueryEventObject, Any]): JQuery

  304. def submit(): JQuery

    Bind an event handler to the "submit" JavaScript event, or trigger that event on an element.

  305. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  306. def text(func: Function2[Int, String, String]): JQuery

  307. def text(t: String): JQuery

    Set the content of each element in the set of matched elements to the specified text.

  308. def text(): String

    Get the combined text contents of each element in the set of matched elements, including their descendants.

  309. def toArray(): Array[Element]

    Retrieve all the elements contained in the jQuery set, as an array.

  310. def toLocaleString(): String

    Definition Classes
    Object
  311. def toString(): String

    Definition Classes
    AnyRef → Any
  312. def toggleClass(func: Function3[Integer, String, Boolean, String], state: Boolean): JQuery

  313. def toggleClass(func: Function3[Integer, String, Boolean, String]): JQuery

  314. def toggleClass(state: Boolean): JQuery

  315. def toggleClass(className: String, state: Boolean = ???): JQuery

  316. def toggleClass(): JQuery

    Add or remove one or more classes from each element in the set of matched elements, depending on either the class's presence or the value of the state argument.

  317. def trigger(event: JQueryEventObject, extraParameters: Any*): JQuery

  318. def trigger(eventType: String, extraParameters: Any*): JQuery

    Execute all handlers and behaviors attached to the matched elements for the given event type.

  319. def triggerHandler(event: JQueryEventObject, extraParameters: Any*): JQuery

  320. def triggerHandler(eventType: String, extraParameters: Any*): JQuery

    Execute all handlers attached to an element for an event.

  321. def unbind(eventType: String, handler: ThisFunction1[Element, JQueryEventObject, Any] = ???): JQuery

  322. def unbind(eventType: String, falsing: Boolean): JQuery

  323. def unbind(event: JQueryEventObject): JQuery

  324. def unbind(): JQuery

    Remove a previously-attached event handler from the elements.

  325. def unwrap(): JQuery

    Remove the parents of the set of matched elements from the DOM, leaving the matched elements in their place.

  326. def update(x: Int, v: Element): Unit

    Shorthand modifier, lifted from scalajs-jquery.

    Shorthand modifier, lifted from scalajs-jquery.

    Annotations
    @JSBracketAccess()
  327. def val(func: Function2[Int, String, String]): JQuery

  328. def val(value: String): JQuery

  329. def val(value: Array[String]): JQuery

  330. def val(): Dynamic

    Get the value of this JQuery.

    Get the value of this JQuery.

    "value" is highly context-dependent. The signature is loose because it can return a String, a Number (?) or an Array, depending on circumstances. See the extension methods in JQueryExtensions for more strongly-typed versions that you can use when you expect a specific return type.

  331. def value(func: Function2[Int, String, String]): JQuery

    Annotations
    @JSName( "val" )
  332. def value(value: String): JQuery

    Annotations
    @JSName( "val" )
  333. def value(value: Array[String]): JQuery

    Annotations
    @JSName( "val" )
  334. def value(): Dynamic

    Annotations
    @JSName( "val" )
  335. def valueOf(): Any

    Definition Classes
    Object
  336. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  337. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  338. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  339. def width(value: ThisFunction2[Element, Integer, Integer, |[Number, String]]): JQuery

  340. def width(value: |[Double, String]): JQuery

    Set the CSS width of every matched element.

  341. def width(): Double

    Get the current computed width for the first element in the set of matched elements.

  342. def wrap(func: ThisFunction1[Element, Integer, |[String, JQuery]]): JQuery

  343. def wrap(wrappingElement: |[|[String, Element], JQuery]): JQuery

    Wrap an HTML structure around each element in the set of matched elements.

  344. def wrapAll(func: ThisFunction1[Element, Integer, |[String, JQuery]]): JQuery

  345. def wrapAll(wrappingElement: |[|[String, Element], JQuery]): JQuery

    Wrap an HTML structure around all elements in the set of matched elements.

  346. def wrapInner(func: ThisFunction1[Element, Integer, |[String, JQuery]]): JQuery

  347. def wrapInner(wrappingElement: |[|[String, Element], JQuery]): JQuery

    Wrap an HTML structure around the content of each element in the set of matched elements.

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped