Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Fade effects

Arthur Guiot edited this page Jul 11, 2017 · 1 revision

$.fadeIn()

This function will require at least 1 arguments, but you can give it 3 arguments, which are:

  • element
  • i (optional), this is the opacity that will be added every frame. Its default value is 0.1
  • display (optional), this will be the display method. By default its value is block

Example:

HTML:

<div class="fade">Hello World 🌎!</div>
<button>Show the div</button>

JS:

var div = $.select(".fade")
$.hide(div)
$.on($.select("button"), "click", function () {
    $.fadeIn(div)
})

$.fadeOut()

This function is the exact opposite of the $.fadeIn() function. As the $.fadeIn() function, it will require at least 1 argument, but you can give 2 arguments, which are:

  • element
  • i (optional), this is the opacity that will be removed every frame. Its default value is 0.1

I don't think 🤔 you'll need any example of this function, because it works like the previuous function.


⚠️ Questions?

Don't hesitate to ask your questions ⁉️ in the issue part 😁

Clone this wiki locally