开发者

How to attach mouse over event in the given code?

开发者 https://www.devze.com 2023-03-27 23:07 出处:网络
I am trying to use http://demo.tutorialzine.com/2011/06/beautiful-portfolio-html5-jquery/ which is having a tutorial page @ http://tutorialzine.com/2011/06/beautiful-portfolio-html5-jquery/

I am trying to use http://demo.tutorialzine.com/2011/06/beautiful-portfolio-html5-jquery/ which is having a tutorial page @ http://tutorialzine.com/2011/06/beautiful-portfolio-html5-jquery/

I want to add mouse over event or click event, but my code is not working.

$("ul#stage li").click(function() {
    alert("Over")

});

I ad开发者_开发百科ded the event in document ready function, but not working. Please help. I tried similar code for 'hover' event.


$("ul#stage li").live('click', function() {
    alert("Over")

});

or for both events

$("ul#stage li").live({
  click: function() {
    // do something on click
  },
  mouseover: function() {
    // do something on mouseover
  }
});
0

精彩评论

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

关注公众号