https://github.com/scalajs-io/jquery
JavaScript library for DOM operations
https://github.com/scalajs-io/jquery
css dom jquery scala scalajs
Last synced: 9 months ago
JSON representation
JavaScript library for DOM operations
- Host: GitHub
- URL: https://github.com/scalajs-io/jquery
- Owner: scalajs-io
- License: apache-2.0
- Created: 2017-02-04T22:33:56.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2019-06-17T23:09:19.000Z (over 6 years ago)
- Last Synced: 2025-01-17T22:42:36.489Z (11 months ago)
- Topics: css, dom, jquery, scala, scalajs
- Language: Scala
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
JQuery API for Scala.js
================================
[jquery](http://api.jquery.com/) - JavaScript library for DOM operations
### Description
jQuery is a fast, small, and feature-rich JavaScript library.
### Build Requirements
* [SBT v1.2.x](http://www.scala-sbt.org/download.html)
### Build/publish the SDK locally
```bash
$ sbt clean publish-local
```
### Running the tests
Before running the tests the first time, you must ensure the npm packages are installed:
```bash
$ npm install
```
Then you can run the tests:
```bash
$ sbt test
```
### Examples
```scala
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"
})
```
### Artifacts and Resolvers
To add the `JQuery` binding to your project, add the following to your build.sbt:
```sbt
libraryDependencies += "io.scalajs.npm" %%% "jquery" % "0.5.0"
```
Optionally, you may add the Sonatype Repository resolver:
```sbt
resolvers += Resolver.sonatypeRepo("releases")
```