io.scalajs.jquery.package.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jquery_sjs0.6_2.11 Show documentation
Show all versions of jquery_sjs0.6_2.11 Show documentation
JQuery bindings for Scala.js
The newest version!
package io.scalajs
import scala.scalajs.js
/**
* jquery package object
* @author [email protected]
*/
package object jquery {
/**
* A string containing a selector expression
*/
type Selector = String
/**
* JQuery Enrichment
* @param element the given [[JQueryElement]]
*/
implicit class JQueryEnrichment(val element: JQueryElement) extends AnyVal {
@inline
def attr(name: String, function: (Int, String) => String): element.type = {
element.attr(name, function: js.Function2[Int, String, String])
}
}
}