开发者

how to display menu on mouseover in symfony or php?

开发者 https://www.devze.com 2023-01-12 15:04 出处:网络
I want to display menu when cursor is on \'Home\' option in symfony. I have created submenu using json but i am not able to display that menu. Please help开发者_开发百科 me on this. Thanks in advance.

I want to display menu when cursor is on 'Home' option in symfony. I have created submenu using json but i am not able to display that menu. Please help开发者_开发百科 me on this. Thanks in advance.


You will have to do this in Javascript, not in PHP, and how you're doing it depends on whether you're using a JS library and in that case, which.

In jQuery you can do something like this:

$('#idOfHomeButton').mouseover(function(evt) {
  $('#idOfMenuDiv').show();
});

$('#idOfHomeButton').mouseout(function(evt) {
  $('#idOfMenuDiv').hide();
});
0

精彩评论

暂无评论...
验证码 换一张
取 消