This topic is locked

Additional text when hovering over a menu item

5/17/2012 6:50:41 AM
PHPRunner General questions
S
Sergej author

Is it possible to include additional text on menu item (menu.php page) which will be shown only when hovering over specific item?

C
cgphp 5/17/2012

In the "Javascript on load" event of the Menu page, enter the following code:

$("tr[id^='item']").each(function(i) {

var linkText = $(this).text();

$(this).hover(function () {

$(this).find('a').html(linkText + ' my new text ' + i);

},function () {

$(this).find('a').html(linkText);

});

});