jquery - JavaScript library for DOM operations
jQuery is a fast, small, and feature-rich JavaScript library.
$ sbt clean publish-local
Before running the tests the first time, you must ensure the npm packages are installed:
$ npm install
Then you can run the tests:
$ sbt test
import io.scalajs.jquery._
import io.scalajs.jquery.JQuery.$
import scala.scalajs.js
$("#greatphoto").attr(new js.Object {
val alt: String = "Beijing Brush Seller"
val title: String = "photo by Kelly Clark"
})
To add the JQuery
binding to your project, add the following to your build.sbt:
libraryDependencies += "io.scalajs.npm" %%% "jquery" % "0.5.0"
Optionally, you may add the Sonatype Repository resolver:
resolvers += Resolver.sonatypeRepo("releases")