{"id":19098164,"url":"https://github.com/udashframework/scala-js-jquery","last_synced_at":"2025-04-30T15:25:11.569Z","repository":{"id":57736372,"uuid":"50502692","full_name":"UdashFramework/scala-js-jquery","owner":"UdashFramework","description":"Static types for the jQuery API for Scala.js programs.","archived":false,"fork":false,"pushed_at":"2023-10-20T10:19:29.000Z","size":172,"stargazers_count":18,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-19T04:41:53.640Z","etag":null,"topics":["hacktoberfest","jquery","jquery-api","scala","scala-js-jquery","scala-js-wrapper","scalajs"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/UdashFramework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-01-27T11:25:53.000Z","updated_at":"2024-03-31T14:17:20.000Z","dependencies_parsed_at":"2025-04-18T16:55:26.292Z","dependency_job_id":"9fa1d2c7-3497-4ecc-9ebe-64f7f694dca4","html_url":"https://github.com/UdashFramework/scala-js-jquery","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UdashFramework%2Fscala-js-jquery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UdashFramework%2Fscala-js-jquery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UdashFramework%2Fscala-js-jquery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/UdashFramework%2Fscala-js-jquery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/UdashFramework","download_url":"https://codeload.github.com/UdashFramework/scala-js-jquery/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251730358,"owners_count":21634369,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","jquery","jquery-api","scala","scala-js-jquery","scala-js-wrapper","scalajs"],"created_at":"2024-11-09T03:44:22.311Z","updated_at":"2025-04-30T15:25:11.552Z","avatar_url":"https://github.com/UdashFramework.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# udash-jquery [\u003cimg align=\"right\" height=\"50px\" src=\"https://avsystem.github.io/Anjay-doc/_images/avsystem_logo.png\"\u003e](http://www.avsystem.com/)\n\n[![CI](https://github.com/UdashFramework/scala-js-jquery/actions/workflows/ci.yml/badge.svg)](https://github.com/UdashFramework/scala-js-jquery/actions/workflows/ci.yml)[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.udash/udash-jquery_sjs1_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.udash/udash-jquery_sjs1_2.13)\n[![Join the chat at https://gitter.im/UdashFramework/scala-js-jquery](https://badges.gitter.im/UdashFramework/scala-js-jquery.svg)](https://gitter.im/UdashFramework/scala-js-jquery?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nStatic types for the jQuery API for [Scala.js](http://www.scala-js.org/) programs. \n\n## Usage\n\nAdd the following dependency to your SBT build:\n\n```scala\nlibraryDependencies += \"io.udash\" %%% \"udash-jquery\" % \"3.3.0\"\n```\n\nthen import the jQuery package: \n\n```scala\nimport io.udash.wrappers.jquery._\n```\n\nSince version `3.0.4` the wrapper targets SJS 1.x series and supports JS dependencies managed by\nby [scalajs-bundler](https://github.com/scalacenter/scalajs-bundler) or [sbt-jsdependencies\n](https://github.com/scala-js/jsdependencies)\n \n\n## Examples\n\n```scala\nimport io.udash.wrappers.jquery._\n\njQ(\"#elementId\")\n  .hide(AnimationOptions(\n    duration = Some(3000),\n    easing = Some(EasingFunction.linear)\n  ))\n  .show(1500, EasingFunction.swing)\n```\n\n```scala\nimport io.udash.wrappers.jquery._\n\nval element: JQuery = jQ(\"#id\")\nelement.text(\"Text content\")\nelement.attr(\"example-attr\", \"value\")\nelement.attr(\"example-attr\") match {\n  case Some(value) =\u003e println(s\"Attribute value: $value\")\n  case None =\u003e println(\"Attribute not found!\")\n}\n```\n\n```scala\nimport io.udash.wrappers.jquery._\n\nval callbacks = jQ.callbacks[js.Function1[(Int, Int), js.Any], (Int, Int)]()\ncallbacks.add((t: (Int, Int)) =\u003e {\n  val (a, b) = t\n  jQ(\"#plus\").append(li(s\"$a + $b = ${a+b}\").render)\n})\ncallbacks.add((t: (Int, Int)) =\u003e {\n  val (a, b) = t\n  jQ(\"#minus\").append(li(s\"$a - $b = ${a-b}\").render)\n})\ncallbacks.add((t: (Int, Int)) =\u003e {\n  val (a, b) = t\n  jQ(\"#mul\").append(li(s\"$a * $b = ${a*b}\").render)\n})\ncallbacks.add((t: (Int, Int)) =\u003e {\n  val (a, b) = t\n  jQ(\"#div\").append(li(s\"$a / $b = ${a/b}\").render)\n})\n\ncallbacks.fire(1, 1)\ncallbacks.fire(3, 3)\ncallbacks.fire(7, 4)\n\ncallbacks.disable()\ncallbacks.fire(1, 2)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudashframework%2Fscala-js-jquery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fudashframework%2Fscala-js-jquery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fudashframework%2Fscala-js-jquery/lists"}