I am having a problem with adding tooltip to :before element. For example my input become error and inside <div class="form-group has-error"> is :before element that has icon. And I want to add with jQuery tooltip to this before element.
This is my code:
$('body').tooltip({
    selector: '[data-input].has-error:before',
    animation: true,
    container: 'body',
    placement: 'bottom',
    title: 'error message'
});
or this:
$('[data-input].has-error:before').on('hover', function () {
    $(this).tooltip({
        animation: true,
        container: 'body',
        placement: 'bottom',
        title: 'error message'
    });
});
Any ideas?
 
    