Answer the question
In order to leave comments, you need to log in
How to correctly specify a trigger for popover?
Good morning comrades.
Faced with an unknown (sort of like) problem.
Bible BS3 is connected (bootstrap.js = 3.0.3).
There is this code:
.sv-friendship-popover{ 'data-js' => "friend-action-#{user.id}" }
= link_to 'Я клиент', '#', class: 'link-style-active', 'data-js' => 'remove-friendship'
.hide{ 'data-js' => 'friendship-popover' }
Вы действительно хотите перестать числиться клиентом этой компании?
= link_to 'Уйти из клиентов', remove_friendship_path(user.id), class: 'link-style', remote: true, method: :post
:javascript
$(document).ready(function () {
$('[data-js=remove-friendship]').on('click', function (e) {
e.preventDefault();
}).popover({
'html': true,
'placement': 'bottom',
'content': $('[data-js=friendship-popover]').html()
});
});
:javascript
$(document).ready(function () {
$('[data-js=remove-friendship]').on('trigger', function (e) {
e.preventDefault();
}).popover({
'html': true,
'trigger': 'focus',
'placement': 'bottom',
'content': $('[data-js=friendship-popover]').html()
});
});
Answer the question
In order to leave comments, you need to log in
$(selector).on('trigger', ...)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question