码迷,mamicode.com
首页 > 其他好文 > 详细

新知识点

时间:2017-03-30 10:52:20      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:color   ring   dex   ogg   on()   bre   stopped   false   container   

toggleClass

$("button").click(function(){
$("p").toggleClass("main");
});

each中的 false

Use return false to break out of each() loops(循环) early.

$( "div" ).each(function( index, element ) {
// element == this
$( element ).css( "backgroundColor", "yellow" );
if ( $( this ).is( "#stop" ) ) {
$( "span" ).text( "Stopped at div index #" + index );
return false;
}
});

新知识点

标签:color   ring   dex   ogg   on()   bre   stopped   false   container   

原文地址:http://www.cnblogs.com/Zara/p/6644362.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!