Using with Rails

Use to bring onmount on your app.

source '' do
  gem 'rails-assets-onmount'

In your application.js, load it using //= require. If you’re using jQuery, load it before onmount.

//= require jquery
//= require onmount

You can then use onmount.

$(document).on('ready load page:change', function () {

$.onmount('.js-tooltip', function () {

If you don’t use jQuery, you can use window.onmount instead.