| 1 |
jQuery( document ).ready( function() { |
| 2 |
jQuery( '.ko-fi-button' ).each( function() { |
| 3 |
var $this = jQuery( this ); |
| 4 |
var title = $this.data( 'title' ); |
| 5 |
kofiwidget2.init( $this.data( 'text' ), $this.data( 'color' ), $this.data( 'code' ) ); |
| 6 |
$html = kofiwidget2.getHTML(); |
| 7 |
if ( title ) { |
| 8 |
$html = $html.replace( 'title="Support me on ko-fi.com"', 'title="' + title + '"' ); |
| 9 |
} |
| 10 |
$this.html( $html ); |
| 11 |
}); |
| 12 |
}); |
| 13 |
|