• Hello — I’m trying to figure out how I can change the “tooltip” (title attribute) for the image on the floating sidebar. Right now, for example, the tooltip displays just “Facebook” for the facebook icon, and I would like it to display “Share on Facebook” instead. Any direction would be most appreciated. Thank you!

    https://wordpress.org/plugins/sassy-social-share/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Heateor Support

    (@heateor)

    Hi,

    You can place following code in functions.php file of your current child theme/theme for this:

    function heateor_sss_custom_script(){
    	?>
    	<script type="text/javascript">
    	jQuery(function(){
    		jQuery('.the_champ_vertical_sharing').find('i').each(function(){
    			var title = jQuery(this).attr('title');
    			if(title != 'More' && title != 'Total Shares'){
    				jQuery(this).attr('title', 'Share on ' + title);
    			}
    		});
    	});
    	</script>
    	<?php
    }
    add_action('wp_head', 'heateor_sss_custom_script');

    Thread Starter siriusly

    (@siriusly)

    Thanks so much! It’s not yet working, but I’m thinking maybe “Total Shares” should possibly be some other variable since I’m not displaying the “Total Shares” count — only the plain social media buttons ??? (Sorry, I’m a PHP/javascript novice…)

    Plugin Author Heateor Support

    (@heateor)

    Let us know your website url so that we can see if above code is appearing in HTML source or not.

    Thread Starter siriusly

    (@siriusly)

    Looks like it’s there to me…
    Dev site is at http://bit.ly/1RIraFK
    I’ve tempoarily disabled the “coming soon” mode so you can take a look.
    Thanks!

    Plugin Author Heateor Support

    (@heateor)

    Try replacing previous code with following

    function heateor_sss_custom_script(){
    	?>
    	<script type="text/javascript">
    	jQuery(function(){
    		jQuery('.heateor_sss_vertical_sharing').find('i').each(function(){
    			var title = jQuery(this).attr('title');
    			if(title != 'More' && title != 'Total Shares'){
    				jQuery(this).attr('title', 'Share on ' + title);
    			}
    		});
    	});
    	</script>
    	<?php
    }
    add_action('wp_head', 'heateor_sss_custom_script');

    Thread Starter siriusly

    (@siriusly)

    That works! Thank you!!!! (looks like it was changing “the_champ_vertical_sharing” that fixed it ??)

    Plugin Author Heateor Support

    (@heateor)

    Yes, that was the problem.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to change floating icon image "Title" (tooltip)’ is closed to new replies.