Kotlin bindings for https://github.com/fgnass/spin.js/
- Add repository
<repositories>
<repository>
<id>public</id>
<name>Public Repo</name>
<url>http://mvn.snx.su/repository/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
- Add dependency
<dependencies>
<dependency>
<groupId>su.snx.kotlin.jsbindings</groupId>
<artifactId>spin</artifactId>
<version>x.x.x.x</version>
</dependency>
</dependencies>
- Add http://spin.js.org/spin.min.js to scripts
<!-- here -->
<script type="text/javascript" src="http://spin.js.org/spin.min.js"></script>
<script type="text/javascript" src="lib/kotlin.js"></script>
- Put script tag after Kotlin's script tag
<script type="text/javascript" src="lib/kotlin.js"></script>
<!-- here -->
<script type="text/javascript" src="lib/spin.js"></script>
- Write code:
Spinner(SpinnerOptions(speed = 5)).spin(target);