Framework7 v4 Tooltip

Hello,

I use Framework7 v4 and want to use tooltip. I have the code below on a seperate page but nothing is happening:

<a href="#" class="link max-round-reps-tooltip">
                <i class="fa fa-question-circle" aria-hidden="true"></i>
</a>

$$(document).on('page:init', '.page[data-name="add-custom-record"]', function (e) {
    var tooltip = app.tooltip.create({
                    targetEl: '.max-round-reps-tooltip',
                    text: 'Tooltip text',
                    on: {
                        show: function () {
                          console.log('Tooltip became visible');
                        }
                      }
                });
});

Nothing is visible and the console log text is also not displayed.

Try to change your code to this:

$$(document).on('page:init', '.page[data-name="add-custom-record"]', function (e, page) {
    var tooltip = app.tooltip.create({
                    targetEl: page.$el.find('.max-round-reps-tooltip'),
                    text: 'Tooltip text',
                    on: {
                        show: function () {
                          console.log('Tooltip became visible');
                        }
                      }
                });
});

Thanks for your response but still nothing is happening. :frowning: