摘要: 1. 使用jquery监听的方法有许多种:// The many ways to bind events with jQuery// Attach an event handler directly to the button using jQuery's// shorthand `click` method.$( "#helloBtn" ).click(function( event ) { alert( "Hello." );}); // Attach an event handler directly the to button using 阅读全文
posted @ 2013-05-12 10:59 一天不进步,就是退步 阅读(323) 评论(0) 推荐(0) 编辑
摘要: 1. jquery事件机制提供了两个事件相关的帮助函数:$.fn.hover 提供一个或者两个传入函数参数// The hover helper function$( "#menu li" ).hover(function() { $( this ).toggleClass( "hover" );});$.fn.toggle 提供两个及以上的传入函数参数// The toggle helper function$( "p.expander" ).toggle( function() { $( this ).prev().addClas 阅读全文
posted @ 2013-05-12 10:41 一天不进步,就是退步 阅读(253) 评论(0) 推荐(0) 编辑