{"id":629,"date":"2012-02-15T10:16:24","date_gmt":"2012-02-15T10:16:24","guid":{"rendered":"http:\/\/brain.dailyon.net\/?p=629"},"modified":"2012-02-15T10:16:24","modified_gmt":"2012-02-15T10:16:24","slug":"jquery-jquery-each-break-continue-%ed%95%98%eb%8a%94-%eb%b0%a9%eb%b2%95","status":"publish","type":"post","link":"https:\/\/blog.goorigo.com\/?p=629","title":{"rendered":"jQuery : jQuery.each -> break continue \ud558\ub294 \ubc29\ubc95"},"content":{"rendered":"<p>each \uba54\uc18c\ub4dc\ub97c \uc0ac\uc6a9\ud558\ub294 \uacbd\uc6b0 for\ubb38\uacfc \uac19\uc740 \uc81c\uc5b4 \ubb38\uc5d0\uc11c \uc0ac\uc6a9\ub418\ub294 break , continue \uc758 \uc4f0\uc784\uc774 \ud544\uc694 \ud558\ub2e4.<br \/>\neach\uc5d0\uc11c\ub294 return true(continue) \uc640 return false(break) \ub97c \uc774\uc6a9\ud574\uc11c break, continue\uc640 \uac19\uc740 \ub3d9\uc791\uc744 \uc77c\uc73c\ud0ac\uc218 \uc788\ub2e4.<\/p>\n<p>$(&#8216;#loop&#8217;).each(function(i){<br \/>\n    if( i == 0 ) return true; \/\/continue;<br \/>\n    return false;\/\/break;<br \/>\n});<\/p>\n<p>[\ucd9c\ucc98] \ub370\uc774\ube0c\ub7ec\uc26c : http:\/\/daybrush.com\/?document_srl=5250<\/p>\n<p>Jquery click Event \uc548\uc758 each \ubb38\uc758 return false   Jquery \/ .NET<br \/>\n2010\/12\/01 18:36<br \/>\nhttp:\/\/blog.naver.com\/kjho98\/140119082813<br \/>\n$(&#8216;#&#8217;).click(function() {<br \/>\n                  $(&#8216;.txtDepPeriod&#8217;).each(function(i) {<br \/>\n                        if ($(this).val() == &#8216;0&#8217;) {<br \/>\n                            return false;<br \/>\n                        }<br \/>\n                    });<br \/>\n                  alert(&#8220;xxx&#8221;); \/\/ alert \ubb38\uc7a5\uc744 \ud0c4\ub2e4.<br \/>\n}<br \/>\n\uc704\uc640 \uac19\uc774 jquery \uc758 click \ubb38 \uc548\uc5d0 each \ubb38\uc774 \ub4e4\uc5b4\uac00\uc11c each\ubb38\uc7a5\uc5d0\uc11c 0 \uac12\uc774 \uc788\uc73c\uba74 click function \uc744 \ube60\uc838 \ub098\uc624\ub824 \ud558\uba74 alert(&#8220;xxx&#8221;) \ubb38\uc7a5\uc774 \ucc0d\ud78c\ub2e4.<br \/>\n\uc65c\ub0d0\uba74 each \ubb38\uc758 return false \ub294 \ub2e8\uc9c0 each \ubb38\uc7a5\uc744 \ubc97\uc5b4 \ub098\uae30 \uc704\ud568\uc774\uae30 \ub54c\ubb38\uc774\ub2e4.<\/p>\n<p>\uc774\ub7f4\ub54c \uc544\ub798\uc640 \uac19\uc774 \uc120\uc5b8\ud574\uc8fc\uba74 click function \uc744 \ube60\uc838 \ub098\uc62c\uc218 \uc788\ub2e4. <\/p>\n<p>$(&#8216;#&#8217;).click(function() {<br \/>\n                    var exit = false;<br \/>\n                    $(&#8216;.txtDepPeriod&#8217;).each(function(i) {<br \/>\n                        if ($(this).val() == &#8216;0&#8217;) {<br \/>\n                            exit = true;<br \/>\n                            return false;<br \/>\n                        }<br \/>\n                    });<br \/>\n                    if (exit) {<br \/>\n                        alert(&#8220;\ud6c4\uc18d\uc6d0\uac00\uc758 \uc794\uc874\ub0b4\uc6a9\uc6d4\uc218\ub294 0 \uc785\ub2c8\ub2e4. \uc794\uc874\ub0b4\uc6a9\uc6d4\uc218\ub97c \uc785\ub825\ud558\uc138\uc694.&#8221;);<br \/>\n                        return false;<br \/>\n                    }<br \/>\n                   alert(&#8220;xxx&#8221;); \/\/alert \ubb38\uc7a5\uc744 \ud0c0\uc9c0 \uc54a\ub294\ub2e4.<br \/>\n}<br \/>\n[\ucd9c\ucc98] Jquery click Event \uc548\uc758 each \ubb38\uc758 return false |\uc791\uc131\uc790 \ub3c4\uc804\ud574\ubd10<\/p>\n","protected":false},"excerpt":{"rendered":"<p>each \uba54\uc18c\ub4dc\ub97c \uc0ac\uc6a9\ud558\ub294 \uacbd\uc6b0 for\ubb38\uacfc \uac19\uc740 \uc81c\uc5b4 \ubb38\uc5d0\uc11c \uc0ac\uc6a9\ub418\ub294 break , continue \uc758 \uc4f0\uc784\uc774 \ud544\uc694 \ud558\ub2e4. each\uc5d0\uc11c\ub294 return true(continue) \uc640 return false(break) \ub97c \uc774\uc6a9\ud574\uc11c break, continue\uc640 \uac19\uc740 \ub3d9\uc791\uc744 \uc77c\uc73c\ud0ac\uc218 \uc788\ub2e4.&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/posts\/629"}],"collection":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=629"}],"version-history":[{"count":0,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=\/wp\/v2\/posts\/629\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.goorigo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}