Is there any way to add Bootstrap tooltip to force?

1

I have a button on my site Wordpress , ie inside the post!

Button:

<a href="#" class="btn btn-primary btn-lg btn-block" id="butdedownlaodnovo" 
data-toggle="tooltip" data-placement="top" title="" role="button" 
target="_blank" aria-pressed="true" data-original-title="Comente, 
agradeça!"><i class="fa fa-arrow-down" aria-hidden="true"></i> BAIXAR 
AGORA</a>

But I have some posts that I did not put the: data-toggle="tooltip" data-placement="top" data-original-title="Comente, agradeça!"

How can I make javascript automatically add this by theme, or another type? without needing to edit all posts ...

    
asked by anonymous 25.04.2018 / 10:09

1 answer

2

You can dynamically add attributes to (as reported in the chat):

$(document).ready(function(){
   $("a", ".novolinkdedownload").attr({
      "data-original-title": "Comente, agradeça!",
      "data-toggle": "tooltip",
      "data-placement": "top"
   });
});
    
26.04.2018 / 13:25