dynamicweb/hosting/static/hosting/js/initial.js
2017-08-20 21:40:17 +05:30

24 lines
No EOL
591 B
JavaScript

$( document ).ready(function() {
$('[data-toggle="tooltip"]').tooltip();
var clipboard = new Clipboard('.to_copy');
clipboard.on('success', function(e) {
var selector = "#";
var copy_button_id = selector.concat(e.trigger.id);
setTimeout(function(){
$(copy_button_id).tooltip('hide');
}, 1000);
});
$('.alt-text').on('mouseenter mouseleave', function(e){
var $this = $(this);
var txt = $this.text();
var alt = $this.attr('data-alt');
$this.text(alt);
$this.attr('data-alt', txt);
});
});