'setting a fade to turbo_stream
Rails UJS has a compactness about it. In a single line of a js.erb file, one calls the dom_id, a partial AND gives it some interaction (that confirms the change in the object with a minimalist approach). Example with jQuery library invoked.
$("#header").html("<%= j render 'header', collection: @trecks %>").css({ opacity: 0 }).fadeTo('slow',1);
with the goal of removing UJS and the reliance on jQuery,
What is the most succinct way to implement an equivalent in vanilla JS of .fadeTo('slow',1) on the turbo stream?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
