开发者

how to display menu on mouseover in symfony or php?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜