July 18, 2015

jQuery how to append data-tip value when mouse hover?


If you want to set the data attribute with .attr() on mouse hover:

Example
jQuery('li#menu-item-75 a').attr('data-tooltip', 'value');

Demo: http://jsfiddle.net/fkdh8/13/

Enjoy!

No comments:

Post a Comment

Integrating Google reCAPTCHA v3 in HTML Form with PHP

  What is Google reCAPTCHA v3? Google reCAPTCHA is a free service that helps protect websites from spam and abuse. reCAPTCHA v3 is the lates...