So I have this php code in my joomla site (joomla's latest article module) and id I'd like to add a bootstrap tooltip to the title of my links. Can someone point me in the right direction as to how i I add this script to a php page. Thanks in advance. Here's the script i got from w3schools.
<script>
$(document).ready(function(){
$('[data-toggle="tooltip"]').tooltip();
});
</script>
and my code which i already have.
<?php
defined('_JEXEC') or die;
?>
<div style="float: left;margin-right: 47px;">
<ul class="latestnews<?php echo $moduleclass_sfx; ?>">
<?php foreach ($list as $item) : ?>
<li itemscope itemtype="http://schema.org/Article">
<a href="<?php echo $item->link; ?>" data-toggle="tooltip" title="<?php echo $item->title; ?>" itemprop="url"><img src="/images /sound.png" />
<span itemprop="name">
<?php echo $item->title; ?>
</span>
</a>
</li>
<?php endforeach; ?>
</ul></div>