From f686dd6fff761ae0defd575a4c73c5d6c46043d0 Mon Sep 17 00:00:00 2001 From: starzu Date: Thu, 28 Jan 2016 13:49:02 +0100 Subject: [PATCH] README improvements --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 2457894..b68a63c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,17 @@ -# scala-js-jquery +# scala-js-jquery [![Build Status](https://travis-ci.org/UdashFramework/scala-js-jquery.svg?branch=master)](https://travis-ci.org/UdashFramework/scala-js-jquery) [](http://www.avsystem.com/) -[![Build Status](https://travis-ci.org/UdashFramework/scala-js-jquery.svg?branch=master)](https://travis-ci.org/UdashFramework/scala-js-jquery) +Static types for the jQuery API for [Scala.js](http://www.scala-js.org/) programs. -Static types for the jQuery API for [Scala.js](http://www.scala-js.org/) programs. +## Example -Sponsored by [AVSystem](http://www.avsystem.com/) \ No newline at end of file +```scala +import io.udash.wrappers.jquery._ + +val element: JQuery = jQ("#id") +element.text("Text content") +element.attr("example-attr", "value") +element.attr("example-attr") match { + case Some(value) => println(s"Attribute value: $value") + case None => println("Attribute not found!") +} +``` \ No newline at end of file