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

The Future of Technology: Emerging Trends to Watch in 2025

Introduction As we navigate through 2025, the technological landscape continues to evolve at an unprecedented pace. Innovations that once se...