CINXE.COM
Office for Catholic Youth Organization – Office for Faith Formation With Youth And Young Adults
<!DOCTYPE html><html lang="en-US"> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"> <link rel="stylesheet" href="https://offyya.org/wp-content/themes/aoptheme/style.css?1704299475" type="text/css" media="screen" /> <style type="text/css" media="print">@media print {*{background:transparent!important;color:#000!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important}p a,p a:visited{color:#444!important;text-decoration:underline}a[href]:after{content:""}a[href]:before{content:""}#content p a[href]:after{content:" (" attr(href) ")"}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}.print-only{display:block!important}.no-print{display:none!important}#comments{page-break-before:always}#mobilemasthead{position:relative !important;}img{max-height:4in; width:auto;display:block; margin:0 auto;}.wp-caption { padding: 10px 0; text-align: center; margin-right:auto;margin-left:auto;}}</style> <title>Office for Catholic Youth Organization – Office for Faith Formation With Youth And Young Adults</title> <meta name='robots' content='max-image-preview:large' /> <style>img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px }</style> <link rel='stylesheet' id='wp-block-library-css' href='https://offyya.org/wp-includes/css/dist/block-library/style.min.css?ver=6.7.2' type='text/css' media='all' /> <link rel='stylesheet' id='bod-modal-block-style-css-css' href='https://offyya.org/wp-content/plugins/modal-block/dist/blocks.style.build.css?ver=6.7.2' type='text/css' media='all' /> <style id='classic-theme-styles-inline-css' type='text/css'> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} </style> <style id='global-styles-inline-css' type='text/css'> :root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;} :where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;} :where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;} :root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;} </style> <link rel='stylesheet' id='embedpress-style-css' href='https://offyya.org/wp-content/plugins/embedpress/assets/css/embedpress.css?ver=6.7.2' type='text/css' media='all' /> <link rel='stylesheet' id='dashicons-css' href='https://offyya.org/wp-includes/css/dashicons.min.css?ver=6.7.2' type='text/css' media='all' /> <link rel="https://api.w.org/" href="https://offyya.org/wp-json/" /><link rel="alternate" title="JSON" type="application/json" href="https://offyya.org/wp-json/wp/v2/pages/610" /><link rel="canonical" href="https://offyya.org/cyo/" /> <link rel="alternate" title="oEmbed (JSON)" type="application/json+oembed" href="https://offyya.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Foffyya.org%2Fcyo%2F" /> <link rel="alternate" title="oEmbed (XML)" type="text/xml+oembed" href="https://offyya.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Foffyya.org%2Fcyo%2F&format=xml" /> <link rel="icon" href="https://offyya.org/wp-content/uploads/2021/07/cropped-favicon-32x32.png" sizes="32x32" /> <link rel="icon" href="https://offyya.org/wp-content/uploads/2021/07/cropped-favicon-192x192.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://offyya.org/wp-content/uploads/2021/07/cropped-favicon-180x180.png" /> <meta name="msapplication-TileImage" content="https://offyya.org/wp-content/uploads/2021/07/cropped-favicon-270x270.png" /> </head> <body class="page-template-default page page-id-610 wp-custom-logo"> <div id="page" aria-label="Page"> <header id="header"> <a class="assistive-text" href="#content" title="Skip to main con tent">Skip to page content</a> <div id="headertop"> <p style="margin:0"><img alt="Office For Faith Formation With Youth And Young Adults " title="Office For Faith Formation With Youth And Young Adults " src="https://offyya.org/wp-content/uploads/2021/07/cropped-favicon-150x150.png"></p> <div id="topwidgets"> <p class="has-text-align-right topphone">222 North 17th Street, Philadelphia PA 19103<br>215-458-5030</p> </div> </div> <nav class="top-navigation click-nav no-print sans" id="navigation" role="navigation"> <button class="button" id="menulabel">Menu</button> <ul id="menu-top-menu" class="nav-bar"><li id="menu-item-22" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-home menu-item-has-children menu-item-22 noparent"><a href="https://offyya.org/">Home</a> <ul class="sub-menu"> <li id="menu-item-99" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-99"><a href="https://offyya.org/about-us/">History</a></li> <li id="menu-item-98" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-98"><a href="https://offyya.org/meet-our-team/">Meet our Team</a></li> <li id="menu-item-437" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-has-children menu-item-437"><a href="#">About Us</a> <ul class="sub-menu"> <li id="menu-item-361" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-361"><a href="https://offyya.org/purpose-of-offyya/">Purpose of OFFYYA</a></li> <li id="menu-item-96" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-96"><a href="https://offyya.org/offyya-mission-statement/">OFFYYA Mission Statement</a></li> <li id="menu-item-95" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-95"><a href="https://offyya.org/offyya-vision-statement/">OFFYYA Vision Statement</a></li> </ul> </li> <li id="menu-item-97" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-97"><a href="https://offyya.org/contact-us/">Contact us</a></li> </ul> </li> <li id="menu-item-23" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-23 noparent"><a href="http://phillyocf.org/">Office for Catechetical Formation</a></li> <li id="menu-item-618" class="menu-item menu-item-type-post_type menu-item-object-page current-menu-item page_item page-item-610 current_page_item menu-item-618 noparent"><a href="https://offyya.org/cyo/" aria-current="page">Office for Catholic Youth Organization</a></li> <li id="menu-item-24" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-24 noparent"><a href="https://phillyomy.org/">Office for Ministry with Youth</a></li> <li id="menu-item-25" class="menu-item menu-item-type-custom menu-item-object-custom menu-item-25 noparent"><a href="https://phillyyam.org/">Office for Ministry with Young Adults</a></li> </ul> </nav> </header> <main id="content"> <div class="pagetitle"> <h2>Office for Catholic Youth Organization</h2> </div> <div class="entry-content clearfix"> <h2 class="wp-block-heading">Welcome</h2> <p>CYO sports is the athletic component of a Parish or Catholic school youth ministry program. CYO enables the partnership between religious leaders, coaches, volunteers, and parents to manage and support a sports program that allows youth to grow in their relationship with God and come to a better understanding of themselves and the Catholic faith through sport. Such a program employs a healthy and enjoyable competition. CYO assists parish leadership in nourishing the emotional, spiritual, social, and physical needs of young people. CYO encourages young people to appreciate the gifts they possess and to succeed simply by striving to grow and improve. CYO allows young athletes to witness the life of Christian discipleship in their coaches and adult leaders and encourages the youth to become responsible members of their faith community.</p> <div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div> <div class="wp-block-buttons is-content-justification-center is-layout-flex wp-container-core-buttons-is-layout-1 wp-block-buttons-is-layout-flex"> <div class="wp-block-button"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background has-link-color wp-element-button" href="https://offyya.org/wp-content/uploads/2024/08/CYO-HANDBOOK-2024-25.pdf">CYO Handbook 2024-25</a></div> <div class="wp-block-button"><a class="wp-block-button__link has-black-color has-luminous-vivid-amber-background-color has-text-color has-background has-link-color wp-element-button" href="https://coacheducation.humankinetics.com/collections/409/products/catholic-coaching-essentials-online-course">CYO Coaches Orientation</a></div> </div> <div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-1 wp-block-columns-is-layout-flex"> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"> <figure class="wp-block-image size-large"><img fetchpriority="high" decoding="async" width="791" height="1024" src="https://offyya.org/wp-content/uploads/2025/03/Flag-Football-2025-release-791x1024.jpg" alt="" class="wp-image-670"/></figure> </div> <div class="wp-block-column is-vertically-aligned-center is-layout-flow wp-block-column-is-layout-flow"> <div class="wp-block-file"><a id="wp-block-file--media-4e0b2253-d388-4495-a5af-5a00f2897ca5" href="https://offyya.org/wp-content/uploads/2025/03/AOP-CYO-Flag-Football-Rules-effective-2.19.2025.pdf">Flag Football Rules</a><a href="https://offyya.org/wp-content/uploads/2025/03/AOP-CYO-Flag-Football-Rules-effective-2.19.2025.pdf" class="wp-block-file__button wp-element-button" download aria-describedby="wp-block-file--media-4e0b2253-d388-4495-a5af-5a00f2897ca5">Download</a></div> </div> </div> <div style="height:50px" aria-hidden="true" class="wp-block-spacer"></div> <p>Certificate of Insurance requests can be sent directly to <a href="mailto:CertificatesAOP@PorterCurtis.com">CertificatesAOP@PorterCurtis.com</a></p> </div> </main><!-- #content --> <footer id="footer" role="contentinfo"> <div id="block-2" class="widget footerwidget"> <p class="has-text-align-center has-medium-font-size"><strong>© Office for Faith Formation with Youth and Young Adults </strong>• <a href="http://archphila.org/">Archdiocese of Philadelphia</a> •<br>222 North 17th Street, Philadelphia PA 19103 • <strong>215-587-3979</strong> • Visit <a href="http://catholicphilly.com/">CatholicPhilly.com</a> for Archdiocesan news and events.</p> </div></footer> </div><!-- #page--> <div class="footerjs"> <style id='core-block-supports-inline-css' type='text/css'> .wp-container-core-buttons-is-layout-1{justify-content:center;}.wp-container-core-columns-is-layout-1{flex-wrap:nowrap;} </style> <script type="text/javascript" src="https://offyya.org/wp-includes/js/jquery/jquery.js" id="jquery-js"></script> <script type="text/javascript" src="https://offyya.org/wp-content/plugins/modal-block/dist/modal.js?ver=1673970647" id="bod-modal-block-js-js"></script> <script type="text/javascript" id="embedpress-front-js-extra"> /* <![CDATA[ */ var eplocalize = {"ajaxurl":"https:\/\/offyya.org\/wp-admin\/admin-ajax.php","is_pro_plugin_active":"","nonce":"8be5dfc452"}; /* ]]> */ </script> <script type="text/javascript" src="https://offyya.org/wp-content/plugins/embedpress/assets/js/front.js?ver=4.2.2" id="embedpress-front-js"></script> <script type="text/javascript"> // SLIDESHOW jQuery( document ).ready(function($) { var slideshow = jQuery('ul.wp-block-gallery.slideshow')[0]; jQuery(slideshow).find("li:gt(0)").hide(); jQuery(slideshow).find('li').each(function(){ var s = jQuery(this).find( 'img' ).attr( 'src' ); jQuery(this).css('background-image', 'url(' + s + ')' ).attr('class','slideanimation').empty(); }); setInterval(function() { jQuery(slideshow).find('li:first').fadeOut(2000).next().fadeIn(2000).end().appendTo(slideshow); }, 4500); }); // NAV MENU: // TOUCH, BEST GUESS var isTouch = false; if( window.matchMedia && window.matchMedia("(hover:none)").matches ){ isTouch=true; } else if( window.matchMedia && window.matchMedia("(hover:hover)").matches ){ isTouch=false; } else if( navigator.userAgent.match(/Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Kindle|NetFront|Nokia|Silk-Accelerated|(hpw|web)OS|Fennec|Minimo|Opera M(obi|ini)|Blazer|Dolfin|Dolphin|Skyfire|Zune|Portable|Vita|Tablet/gi) ){ isTouch=true; } // REPLICATE "JQUERY.PARENTS(ELEMENT, UPTOTHISELEMENT)" for :focus nav function getParents(el, parentSelector) { if (parentSelector === undefined) { parentSelector = document; } var parents = [], p = el.parentNode; while (p !== parentSelector) { var o = p; parents.push(o); p = o.parentNode; } parents.push(parentSelector); return parents; } function runNav(){ var bd = document.body; var nav = document.getElementById('navigation'); // add touch or click to body class but also switch to 'is-touch' if someone taps, in case mobile check guesses wrong if ( isTouch ){ bd.classList.add('is-touch'); } else { bd.classList.add('is-click'); } function oopsisactuallytouch(){ isTouch=true; usetherightnav(); bd.classList.remove('is-click'); bd.classList.add('is-touch'); bd.removeEventListener('touchstart', oopsisactuallytouch); } bd.addEventListener('touchstart', oopsisactuallytouch); // set up touch or click navigation depending on width, and recalculate if resized (default is click, set in html) function makenavtouch(){nav.classList.remove('click-nav'); nav.classList.add('touch-nav'); } function makenavclick(){nav.classList.remove('touch-nav'); nav.classList.add('click-nav'); } function usetherightnav(){ if( 600 < window.innerWidth && isTouch ){ makenavtouch(); }else if( 600 < window.innerWidth && !isTouch ){ makenavclick(); }else{ makenavtouch(); } //if screen's big but touch, make touch; if it's big but not touch, make click; if it's small and any, make touch } usetherightnav(); // on page load, set right nav window.addEventListener('resize', usetherightnav); // 'menu' button appears only for touch nav, opens up the nav on click (see css) document.getElementById('menulabel').addEventListener('click', function(e){ e.preventDefault(); bd.classList.toggle('show-main-menu'); }); ////// MENU/SUB-MENU TOGGLING: // Toggle menu's inner submenu dropdowns on click (good for click, tap and keyboard) var menuparents = nav.querySelectorAll('li.menu-item-has-children.noparent>a'); //make sure you keep 'noparent' code for(i=0; i<menuparents.length; i++){ menuparents[i].addEventListener('click', function(e){ if( isTouch || 600 > window.innerWidth ){ e.preventDefault(); } // if isTouch = bigscreen would have preventdefault on all .noparents with any children //this.parentNode.classList.toggle('submenuopen'); // do below instead to close other open menus var par = this.parentNode; if (par.classList.contains('submenuopen')){ par.classList.remove('submenuopen'); } // close this menu if it's opened and being clicked again else { var old = nav.querySelector('.submenuopen'); if(old){old.classList.remove('submenuopen');} par.classList.add('submenuopen'); } // otherwise close any other open menus & open this one }); } // above, but for sub-sub menus var menusubparents = nav.querySelectorAll('ul.sub-menu .menu-item-has-children>a'); for(i=0; i<menusubparents.length; i++){ menusubparents[i].addEventListener('click', function(e){ e.preventDefault(); this.parentNode.classList.toggle('sub-submenuopen'); }); } // add a hover state to the nav for keyboard users (can't :focus an li), requires all parents to be highlighted var menuall = nav.querySelectorAll('a'); for(i=0; i<menuall.length; i++){ menuall[i].addEventListener('focus', function(e){var pars=getParents(this, nav); Array.prototype.forEach.call(pars, function(el, i){el.classList.add('generatedhover'); }); }); menuall[i].addEventListener('blur', function(e){ var pars=getParents(this, nav); Array.prototype.forEach.call(pars, function(el, i){el.classList.remove('generatedhover'); }); }); } }; runNav(); </script> </div><!--footer js--> </body> </html>