jQuery Add Title to Div

A very quick one for you on how to add a ‘Title’ attribute to a div/element. Unsuprisingly we are using the jQuery ‘attr’ function:-

<!-- Add Title to Element -->
<script type="text/javascript">  
   $(document).ready(function() {  
$('#your-div').attr('title', 'Your title goes here');
About the Author
jQuery Add Title to Div jQuery Add Title to Div 0da77002febbfe28d15144a57bbcc2c9 s 180 d mm r g


A highly experienced Web Designer / Web Developer (Webflow, WordPress, Weebly & Custom), Front-end / Back-end Developer & New Media Specialist, with extensive knowledge of a wide spectrum of technologies in the Development and Creative Industries, built up over a number of years.