Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- jQuery(document).ready(function($) {
- jQuery( 'a[href$=".jpg"], a[href$=".jpeg"], a[href$=".gif"], a[href$=".png"]' ).each( function () {
- var imageTitle = '';
- if ( jQuery( this ).next().hasClass( 'wp-caption-text' ) ) {
- imageTitle = jQuery( this ).next().text();
- }
- jQuery( this ).attr( 'title', imageTitle );
- });
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement