Best One-Year Online Master’s Degree Programs of 2024 - Intelligent (2024)

If you are hoping to jumpstart your career or even get a promotion, a one-year online master’s program is a fast, efficient way to gain the necessary educational experience.

These programs are usually designed to be flexible, with courses that students can complete according to their schedules. Before enrolling in a one-year online master’s program, students should confirm the pace. Some one-year programs are accelerated, meaning they condense two years’ worth of coursework into a single academic year, requiring more time and energy than a traditionally paced program.

One-year online master’s degree programs are popular in areas like business, information technology, criminal justice, education, marketing, and more. The Bureau of Labor Statistics reports that individuals with master’s degrees earn an average of $1,574 per week, with an unemployment rate of only 2.6%.

The cost of an online master’s degree is predominantly determined by the type of school a student chooses. According to the National Center for Education Statistics, the average cost of annual graduate tuition is $12,394 at public universities and $26,621 at private institutions.

How to Choose a One-Year Online Master’s Program

Choose your area of study

Knowing that you want a master’s degree that can be completed in one year of study is a great starting point for your search.

Next, students should determine their area of study so they can seek out programs in that field that take one year to complete. Some things to consider when deciding on an area of study include:

  • Professional short-term and long-term goals and the type of educational experience needed to achieve them
  • Educational background, including undergraduate field of study
  • Professional experience and credentials

It’s important to keep in mind that because of their fast-paced nature, many one-year master’s programs require students to have certain foundational knowledge of the subject, which can be acquired through undergraduate study or professional experience.

Students should also use this time to reflect on their personal needs in terms of course delivery method. Are students looking for a synchronous program with virtual class meetings at designated times, or do they need the flexibility of an asynchronous program with coursework that can be completed on their own schedule?

Research schools and programs

Regardless of the type of program you’re seeking, make sure that the school is accredited by a recognized regional accrediting agency. This will confirm that the institution and its programs meet the highest standards for quality in education. Students must be enrolled at an accredited school to be considered for federal financial aid, and many employers seek job applicants with degrees from accredited institutions. Many programs also have programmatic accreditation through professional organizations.

There are many ways to gather information about schools and programs. Visiting a college’s website is always a good place to start, as they usually provide information on curriculum, faculty, experiential learning opportunities, admissions requirements, and more. For remote students, many schools offer virtual open houses or information sessions. Prospective applicants can also follow schools and programs on social media to learn more about the culture and accomplishments of the department.

Gather as much information as possible, including answers to these questions:

  • How many credits are students expected to take each term?
  • Are there any experiential learning components, such as an internship or field study?
  • Who are the faculty, and what are their qualifications?
  • What networking opportunities are available with peers, faculty, and other professionals?
  • Is it a synchronous or asynchronous online program?
  • Will a one-year online master’s program provide the knowledge depth needed for particular advanced positions?
  • Can the program be accomplished completely online or as a hybrid, requiring on-campus interaction?
  • What support services, such as counseling, academic and career advising, tutoring, and technical support, do online students have access to?

Prepare for tests and applications

The application procedures and requirements will vary by school and program. Confirm these requirements with an admissions representative before beginning your application.

At a minimum, students must have a bachelor’s degree to be considered eligible for a master’s program. Some master’s programs want students to have a bachelor’s in a particular related field of study. Others may require a minimum undergraduate GPA, prerequisite coursework, or professional experience in the field.

A standard application for an online master’s degree consists of the following:

  • Completed application form and required fees
  • Official transcripts from all previous institutions attended
  • Letters of recommendation from current or former professors, employers, colleagues, academic advisors, or community leaders
  • Resume or CV highlighting relevant professional and educational experience
  • An essay or statement of intent detailing interest and suitability for the program
  • GRE or GMAT test scores

Select your program

There are varying approaches to choosing which programs to apply to. Some students submit multiple applications to boost their odds of acceptance, while others target a single program based on their interests and needs. Whatever path you choose, most schools charge an application fee. That money can add up if you’re applying to several programs. Contact the school to ask about a fee waiver if you need financial assistance with these fees.

Determine how you’ll pay for your degree

When researching programs, students should contact the school’s financial aid office for more details about program costs and available financial aid options.

Most students will want to complete the Free Application for Federal Student Aid (FAFSA). This is what schools use to determine a student’s eligibility for federal student loans, grants, and work-study, as well as need-based institutional aid like scholarships and assistantships. Many schools also offer merit-based scholarships, fellowships, and grants to high-achieving students.

Students can also inquire if their school offers payment plans or tuition discounts for veterans or military service members.

Those who plan on working while completing their online master’s degree should check to see if their employer provides tuition assistance benefits.

Best 50 Accredited One-Year Online Master’s Programs

Best One-Year Online Master’s Degree Programs of 2024 - Intelligent (1)
01University of Texas Rio Grande Valley
01Colorado State University
01Ball State University
01University of North Texas
01Regent University
01University of Florida
01California Baptist University
01University of Texas Permian Basin
01Johns Hopkins University
01Regis University
01Arkansas State University
01Missouri University of Science and Technology
01North Carolina State University
01Auburn University
01Touro University Worldwide
01Anderson University
01University of North Carolina at Chapel Hill
01California State University, East Bay
01Northeastern University College of Professional Studies
01East Carolina University
01Frostburg State University
01Villanova University
01Boston University
01University of Illinois Springfield
01Stetson University
01Western Governors University
01George Washington University
01Maryville University
01University of Findlay
01Central Washington University
01New Jersey Institute of Technology
01Fontbonne University
01Lamar University
01North American University
01Saint Leo University
01Worcester Polytechnic Institute
01Georgia Institute of Technology
01Cumberland University
01Liberty University
01New York University
01Stony Brook University
01Greenville University
01Brandeis University
01Trine University
01Northwestern School of Professional Studies
01Colorado State University
01Cleveland State University
01St. Thomas University

Discover More Options

'); elem.parentNode.removeChild(elem); //document.querySelector('.program-structure .block .title-with-img h2').insertAdjacentHTML('afterend', ''); document.querySelector('.program-structure .block .title-with-img .beige-h2-wrap').appendChild(pTag); document.querySelector('.program-structure .block .title-with-img .beige-h2-wrap p').classList.add('p-under-h2'); document.querySelector('.program-structure .block .title-with-img .beige-h2-wrap .p-under-h2').innerHTML = 'These rankings were compiled using our methodology here, and include sponsored results from our partners.'; const popupDivTag = document.createElement('div'); document.querySelector('.program-structure .block .title-with-img p span').appendChild(popupDivTag); document.querySelector('.program-structure .block .title-with-img p span div').classList.add('sponsored-popup-div'); document.querySelector('.program-structure .block .title-with-img p span div').innerHTML = 'www.intelligent.com is an advertising-supported site. Featured or trusted partner programs and all school search, finder, or match results are for schools that compensate us. This compensation does not influence our school rankings, resource guides, or other editorially-independent information published on this site.'; // Show popup on click document.addEventListener('click', function(){ let sponsoredLink = document.querySelector('#sponsored-link'); if (sponsoredLink.contains(event.target)) { document.querySelector('.sponsored-popup-div').classList.add('show-popup'); } else { if(document.querySelector('.sponsored-popup-div')) document.querySelector('.sponsored-popup-div').classList.remove('show-popup'); } }); // const styleToolTip = document.createElement('style'); // styleToolTip.textContent = `.advertisem*nt {color:#3f3f46 !important; font-size: 11px !important; height: 16px!important; left:0;} // @media(max-width:1185px){ // .advertisem*nt{ // margin-left:-45px !important; // left: 50% !important; // } // } // `; // const styleAdvertisem*ntText = document.createElement('style'); // styleAdvertisem*ntText.textContent = ` // button { // --label-font-size: 14px !important; // text-transform: none !important; // } // `; // const sonicTooltipStyle = document.createElement('style'); // sonicTooltipStyle.textContent = ` // :host sonic-tooltip { // --label-font-size: 14px !important; // --label-text-transform: none !important; // } // `; //document.querySelectorAll('.red-ventures-widget he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper .advertisem*nt').appendChild(styleToolTip); // Append stylesheet under red venture swidget document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.appendChild(style); // if(document.querySelectorAll('.red-ventures-widget he-custom-editorial-listings')[0]) { // document.querySelectorAll('.red-ventures-widget he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper .advertisem*nt').innerHTML = advPopupContent; // setTimeout(() => { // document.querySelectorAll('.red-ventures-widget he-custom-editorial-listings')[0].shadowRoot.querySelectorAll('.sonic-el-wrapper sonic-tooltip')[0].shadowRoot.querySelector('button').style.textTransform = 'none'; // document.querySelectorAll('.red-ventures-widget he-custom-editorial-listings')[0].shadowRoot.querySelector('sonic-tooltip').appendChild(sonicTooltipStyle); // }, 100); // } function repeatingFunc() { let prod_block = document.querySelectorAll('.product-container .program-listing .block'); let currentDefaultDetailItem = 1; // if (prod_block.length <= 3) { // currentDefaultDetailItem = (prod_block.length - 1); // } var sch_degree = document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('button.button-expand-toggle'); if(sch_degree !== null){ // clone content of detail box for red ventures widgets let cloneSvg = document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('.expand-close').cloneNode(true); // let cloneDetail = document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('.h-full.grid').cloneNode(true); //Add Detail box and styling document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.appendChild(wrapper); document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('div.red-venture-detail-box').appendChild(innerItem); // Append close button of red ventures document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('div.red-venture-detail-box').appendChild(cloneSvg); let storeLoader = document.getElementById('d-loader'); document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('div.red-venture-detail-box .item').appendChild(storeLoader); storeLoader.style.display = 'block'; // Append stylesheet under red venture swidget let cloneDetail2 = document.querySelector('.hidden-listings'); // Append detailed content of red ventures document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('div.red-venture-detail-box .item').appendChild(cloneDetail2); // Append stylesheet in red venture detail box setTimeout(() => { if(document.querySelectorAll('.red-venture-detail-box.height-increase').length > 0){ if (document.querySelectorAll('.red-venture-detail-box.height-increase he-custom-editorial-listings')[0]) { document.querySelectorAll('.red-venture-detail-box.height-increase he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper').classList.add('expanded'); document.querySelectorAll('.red-venture-detail-box.height-increase he-custom-editorial-listings')[0].shadowRoot.appendChild(styleExpanded); //document.querySelectorAll('.red-venture-detail-box.height-increase he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper .advertisem*nt').innerHTML = advPopupContent; // setTimeout(() => { // document.querySelectorAll('.red-venture-detail-box he-custom-editorial-listings')[0].shadowRoot.querySelectorAll('.sonic-el-wrapper sonic-tooltip')[0].shadowRoot.querySelector('button').appendChild(styleAdvertisem*ntText); // }, 100); //document.querySelectorAll('.red-venture-detail-box.height-increase he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper .advertisem*nt').style.marginLeft = '7px'; //document.querySelectorAll('.red-venture-detail-box.height-increase he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper .advertisem*nt .block').style.textTransform = 'none'; //document.querySelectorAll('.red-venture-detail-box.height-increase he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper .advertisem*nt').appendChild(styleToolTip); } if (document.querySelector('.hidden-listings')) { document.querySelector('.hidden-listings').style.display = 'block'; } document.querySelector('.red-venture-detail-box.height-increase .animated-loader').style.display = 'none'; //document.querySelectorAll('.red-ventures-widget he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper .advertisem*nt').innerHTML = advPopupContent; document.querySelector('.red-venture-detail-box').style.overflow = 'visible'; breakStringWithSpecialCharacter(19); } }, 3000); //CLICK EVENT sch_degree.addEventListener('click', function(){ // remove all open detail box if(document.querySelector('.detail-content.height-increase') !== null){ document.querySelector('.detail-content.height-increase').remove(); document.querySelector('.column.selected').classList.remove('selected'); } // remove existing expanded functionality from red ventures document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper').classList.remove('expanded'); // clone detail box of red venture widgets let detailClone = document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('.red-venture-detail-box').cloneNode(true); // show block after 3rd card logic detailClone.style.display = "block"; let placeAfter = ''; var total_items = prod_block.length; if(document.querySelector('.red-ventures-widget')) { total_items = total_items + 1; if (total_items == 3) { currentDefaultDetailItem = 1; } if (total_items < 3) { currentDefaultDetailItem = 0; } } if(window.innerWidth > 1000){ placeAfter = document.querySelector(`[data-counter="${currentDefaultDetailItem}"]`); } else { placeAfter = document.querySelector('.red-ventures-widget'); } if(document.querySelector('.red-venture-detail-box') == null){ if (placeAfter) placeAfter.insertAdjacentHTML('afterend', detailClone.outerHTML); this.classList.add('active'); // Append stylesheet in red venture detail box setTimeout(() => { if(document.querySelectorAll('.red-venture-detail-box he-custom-editorial-listings')[0]) { if(document.querySelectorAll('.red-venture-detail-box he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper')) { document.querySelectorAll('.red-venture-detail-box he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper').classList.add('expanded'); } document.querySelectorAll('.red-venture-detail-box he-custom-editorial-listings')[0].shadowRoot.appendChild(styleExpanded); //document.querySelectorAll('.red-venture-detail-box he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper .advertisem*nt').innerHTML = advPopupContent; // setTimeout(() => { // document.querySelectorAll('.red-venture-detail-box he-custom-editorial-listings')[0].shadowRoot.querySelectorAll('.sonic-el-wrapper sonic-tooltip')[0].shadowRoot.querySelector('button').appendChild(styleAdvertisem*ntText); // }, 100); // document.querySelectorAll('.red-venture-detail-box he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper .advertisem*nt').appendChild(styleToolTip); } if(document.querySelector('.hidden-listings')) { document.querySelector('.hidden-listings').style.display = 'block'; } if(document.querySelector('.red-venture-detail-box .animated-loader')) document.querySelector('.red-venture-detail-box .animated-loader').style.display = 'none'; if(document.querySelector('.red-venture-detail-box')) document.querySelector('.red-venture-detail-box').style.overflow = 'visible'; breakStringWithSpecialCharacter(19); }, 2000); setTimeout(function(){ if(document.querySelector('.red-venture-detail-box')) document.querySelector('.red-venture-detail-box').style.maxHeight = '2500px'; },1); } else { if(document.querySelectorAll('.red-venture-detail-box.height-increase he-custom-editorial-listings')[0]) { document.querySelector('.red-venture-detail-box').style.overflow = 'visible'; } document.querySelector('.red-venture-detail-box').style.maxHeight = '0'; this.classList.remove('active'); setTimeout(function(){ document.querySelector('.red-venture-detail-box').remove(); }, 300) } // red ventures box close button and logic closeRedVenture = document.querySelector('.expand-close'); if(closeRedVenture) { closeRedVenture.addEventListener('click', function(){ document.querySelector('.red-venture-detail-box').style.maxHeight = '0'; sch_degree.classList.remove('active'); console.log('2') setTimeout(function(){ document.querySelector('.red-venture-detail-box').remove(); }, 1000) }); } }) setTimeout(() => { // red ventures box close button and logic closeRedVenture = document.querySelector('.expand-close'); if(closeRedVenture !== null){ closeRedVenture.addEventListener('click', function(){ document.querySelector('.red-venture-detail-box').style.maxHeight = '0'; sch_degree.classList.remove('active'); console.log('3') setTimeout(function(){ document.querySelector('.red-venture-detail-box').remove(); }, 500) }) }; }, 2500); } else { setTimeout(repeatingFunc, 2000); } } setTimeout(() => { repeatingFunc(); }, 3000); }}function breakStringWithSpecialCharacter(maxLength=12) { if(maxLength == 19) { var school = document.querySelectorAll('.red-venture-detail-box he-custom-editorial-listings')[0].shadowRoot.querySelector('.school').innerHTML; } else { if(document.querySelectorAll('.red-ventures-widget he-custom-editorial-listings')[0].shadowRoot.querySelector('.school')) var school = document.querySelectorAll('.red-ventures-widget he-custom-editorial-listings')[0].shadowRoot.querySelector('.school').innerHTML; } if(school) { school = school.replace('', ''); school = school.replace('', ''); if(/\s/g.test(school) == false && school.length > maxLength ) { const SpecialChars = ['@']; SpecialChars.forEach(function (item){ if(school.includes(item)) { var res = school.split(item); var changeString = ''+res[0]+''+item; school = changeString + res[1]; } }); if(maxLength == 19) { document.querySelectorAll('.red-venture-detail-box he-custom-editorial-listings')[0].shadowRoot.querySelector('.school').innerHTML = school; } else { document.querySelectorAll('.red-ventures-widget he-custom-editorial-listings')[0].shadowRoot.querySelector('.school').innerHTML = school; } } } }function mainDirectory(){ // DOM element let prod_container = document.querySelectorAll('.product-container'); let prod_block = document.querySelectorAll('.product-container .program-listing .block'); // if container length more than 0 if(prod_container.length > 0){ // initialize variable let counter = 0; let number = 1; // reduce heading text font size in case text is large let headingText = document.querySelector('.title-with-img h2'); let splitText = headingText.textContent.split(''); if(splitText.length > 30){ headingText.style.cssText = 'font-size: 70px; letter-spacing: -2px; line-height: 80px;'; } // set product length in h2 under title with image let setInnerText = document.querySelector('.prod-length'); if(setInnerText){ setInnerText.innerHTML = prod_block.length; //Update the H2 name at everywhere it is used in anchor document. querySelectorAll(`a[href='#${headingText.getAttribute('id')}']`)?. forEach( node => (node.innerHTML = headingText.textContent) ); } // set hidden div if module is 2 if(window.innerWidth > 1000){ var e = document.createElement('div'); e.classList.add('block'); e.style.border = 'none'; e.setAttribute('data-counter', prod_block.length); if(document.querySelector('.red-venutre-box') != null){ if((prod_block.length - 2) % 3 == 2){ document.querySelector('.program-listing').appendChild(e); } } else { if(prod_block.length > 2 && prod_block.length % 3 == 2){ document.querySelector('.program-listing').appendChild(e); } } } // looping for each block for(i = 0; i < prod_block.length; i++){ // set data-counter attribute prod_block[i].setAttribute('data-counter', counter); // hide tag if inner text is empty let hideBlankTag = prod_block[i].children[1].getElementsByClassName('check-inner-text'); for(j = 0; j < hideBlankTag.length; j++){ if(hideBlankTag[j].innerText.trim() == '' || hideBlankTag[j].innerText.trim() == 'No'){ hideBlankTag[j].parentNode.classList.add('hide-empty-attr'); } } let hideRankingBox = prod_block[i].children[1].getElementsByClassName('middle-outer-column'); for(k = 0; k < hideRankingBox.length; k++){ // console.log(hideRankingBox[k].children[0].querySelector('.check-inner-text').innerText); if(hideRankingBox[k].children[0].querySelector('.check-inner-text').innerText.trim() == ''){ hideRankingBox[k].classList.add('hide-empty-attr'); } } // added 0 if number less than 10 if(number < 10){ number = '0'+number; } if(number < 11){ prod_block[i].classList.add('top-ten'); } // add dynamically number prod_block[i].querySelector('.number').innerHTML = number; // open detail box when click on small boxes prod_block[i].addEventListener('click', function(){ if(document.querySelector('.red-venture-detail-box') !== null){ document.querySelector('.red-venture-detail-box').remove(); document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('button.button-expand-toggle').classList.remove('active'); } //Mobile view var w = window.innerWidth; //below is workaround var current = parseInt(this.getAttribute('data-counter')); if(document.querySelector('.detail-content.height-increase') !== null || document.querySelector('.red-venture-detail-box.height-increase') !== null){ var total = this.parentNode.children.length - 1; } else { var total = this.parentNode.children.length; } // remove selected class from each single box for(k = 0; k < prod_block.length; k++){ prod_block[k].children[0].classList.remove('selected'); } // add selected class when click on single box this.children[0].classList.add('selected'); // condition added for open detail box after 3 small box if(w > 1000){ if(document.querySelector('.red-venutre-box') != null){ var total_items = prod_block.length + 1; if(current == 0 || current == 1){ position = 1; if (total_items == 3) { position = 1; //(total_items - 1); } if (total_items < 3) { position = 0; //(total_items - 1); } } else { var temp = 4 + 3 * Math.floor((current - 2) / 3); position = (temp >= total ? total-2 : temp); } } else { var temp = 3 + 3 * Math.floor(current / 3); position = (temp > total ? total : temp) - 1; } } else{ position = current; } // remove detail box let countDetailBox = document.querySelectorAll('.program-listing > .detail-content'); let countDetailBox1 = document.querySelector('.program-listing > .detail-content'); // clone detail box and insert after 3rd single box let detailClone = this.children[1].cloneNode(true); // open detail box if counter detail box lenth is 0 and id is not equal to data id of detail box if(countDetailBox.length == 0 || this.children[0].getAttribute('id') != countDetailBox1.getAttribute('data-id')){ // remove detail box for(k = 0; k < countDetailBox.length; k++){ countDetailBox[k].remove(); } // adding class on clone element detailClone.classList.add('height-increase'); detailClone.style.display = 'block'; // place detail box after 3rd box let placeAfter = document.querySelector(`[data-counter="${position}"]`); placeAfter.insertAdjacentHTML('afterend', detailClone.outerHTML); // settimeout is added for animation setTimeout(function(){ document.querySelector('.program-listing > .detail-content').style.maxHeight = '2500px'; window.scrollTo({ top: placeAfter.offsetTop - 71, behavior: "smooth" }); },1); } // close detail box when click toggle on same item else if(this.children[0].getAttribute('id') == countDetailBox1.getAttribute('data-id')) { this.children[0].classList.remove('selected'); detailClone.style.display = 'none'; document.querySelector('.program-listing > .detail-content').style.maxHeight = '0'; setTimeout(function(){ for(k = 0; k < countDetailBox.length; k++){ countDetailBox[k].remove(); } },1000); } }); // close detailed clone box counter++; number++; } } // Open team detail according to name in URL on load window if(prod_container.length > 0){ let getCurrentUrl = window.location.href; let getId = getCurrentUrl.split('#'); // open box on run time where find the same id of url if(getId[1] !== undefined){ let loadedItem; Object.keys(prod_container).map(item => { loadedItem = prod_container[item].children[0].children; let currentId = document.querySelector(`[data-id="${getId[1]}"]`); let getDataIdAttr = currentId.getAttribute('data-id'); if(getDataIdAttr == getId[1]){ //Mobile view var w = window.innerWidth; //below is workaround var current = parseInt(currentId.parentNode.getAttribute('data-counter')); var total = loadedItem.length; // console.log(total); // add selected class when click on single box currentId.parentNode.children[0].classList.add('selected'); // condition added for open detail box after 3 small box if(w > 1000){ if(document.querySelector('.red-venutre-box') != null){ breakStringWithSpecialCharacter(); if(current == 0 || current == 1){ position = 1; if(prod_block.length < 3) { position = (prod_block.length) -1; } } else { var temp = 4 + 3 * Math.floor((current - 2) / 3); position = (temp >= total ? total-2 : temp); } } else { var temp = 3 + 3 * Math.floor(current / 3); position = (temp > total ? total : temp) - 1; } } else{ position = current; } // clone detail box let detailClone = currentId.cloneNode(true); detailClone.classList.add('height-increase'); detailClone.style.display = 'block'; // place detail box after 3rd small box let placeAfter = document.querySelector(`[data-counter="${position}"]`); // insert html after 3rd small box placeAfter.insertAdjacentHTML('afterend', detailClone.outerHTML); // setimeout added for animation setTimeout(function(){ document.querySelector('.program-listing > .detail-content').style.maxHeight = '2500px'; },1); } }); } else { // if hash is not present in url then open first card by default if(document.querySelector('.red-venutre-box') != null){ breakStringWithSpecialCharacter(); let currentDefaultDetailItem = 1; var total_items = prod_block.length + 1; if (total_items < 3) { currentDefaultDetailItem = 0; //(total_items - 1); } if (total_items == 3) { currentDefaultDetailItem = 1; //(total_items - 1); } setTimeout(() => { cloneFirstProd = document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('.red-venture-detail-box').cloneNode(true); document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('button.button-expand-toggle').classList.add('active'); cloneFirstProd.classList.add('height-increase'); cloneFirstProd.style.display = 'block'; let placeAfter; if(window.innerWidth > 1000){ placeAfter = document.querySelector(`[data-counter="${currentDefaultDetailItem}"]`); } else { placeAfter = document.querySelector('.red-ventures-widget'); } if(placeAfter) placeAfter.insertAdjacentHTML('afterend', cloneFirstProd.outerHTML); setTimeout(function(){ if(document.querySelector('.red-venture-detail-box')) { document.querySelector('.red-venture-detail-box').style.maxHeight = '2500px'; } },1); }, 3000); } else { let currentDefaultDetailItem = 2; if (prod_block.length <= 3) { currentDefaultDetailItem = (prod_block.length - 1); } cloneFirstProd = prod_container[0].children[0].children[0].children[1].cloneNode(true); cloneFirstProd.classList.add('height-increase'); cloneFirstProd.style.display = 'block'; // add selected class when click on single box prod_container[0].children[0].children[0].children[0].classList.add('selected'); // place detail box after 3rd small box let placeAfter = document.querySelector(`[data-counter="${currentDefaultDetailItem}"]`); placeAfter.insertAdjacentHTML('afterend', cloneFirstProd.outerHTML); setTimeout(function(){ document.querySelector('.program-listing > .detail-content').style.maxHeight = '2500px'; },1); } } // remove detail box when click on close button Object.keys(prod_container).map(item => { prod_container[item].addEventListener('click', function(e){ if(e.target.classList == 'close-button'){ prod_container[item].querySelector('.selected').classList.remove('selected'); document.querySelector('.program-listing > .detail-content').style.maxHeight = '0'; // settimeout is added for animation setTimeout(function(){ document.querySelector('.program-listing > .detail-content').style.display = 'none'; e.target.parentNode.parentNode.parentNode.remove(); },1000); } }); }); }}var tryCounter = 15;//Calling for this function is in footerfunction checkRegion(callbackRV, CallbackCond){ setTimeout(() => { let checkRedVentureModule; if(document.querySelector('.program-listing he-custom-editorial-listings') != null){ var hcel = document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot; if(hcel && document.querySelectorAll('.red-ventures-widget').length && document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelectorAll('.sonic-el-wrapper').length) { //Good to move fwd checkRedVentureModule = document.querySelectorAll('.program-listing he-custom-editorial-listings')[0].shadowRoot.querySelector('.sonic-el-wrapper'); document.querySelector('.red-ventures-widget').style.display = 'block'; callbackRV(); CallbackCond(); } else if(tryCounter > 0) {//Wait till widget loaded, it will also not work other than US. Still check for 20 times in case of internet delay tryCounter = tryCounter - 1; checkRegion(callbackRV, CallbackCond); return }else { if(document.querySelector('.red-ventures-widget')){ //important to remove it, otherwise block will not show properly document.querySelector('.red-ventures-widget').remove(); document.querySelector('.product-table').classList.remove('red-venutre-box'); } CallbackCond(); } }else CallbackCond(); //Normal use case when no RV add is added }, 200);}
Best One-Year Online Master’s Degree Programs of 2024 - Intelligent (2024)

References

Top Articles
Latest Posts
Article information

Author: Nathanael Baumbach

Last Updated:

Views: 5902

Rating: 4.4 / 5 (75 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Nathanael Baumbach

Birthday: 1998-12-02

Address: Apt. 829 751 Glover View, West Orlando, IN 22436

Phone: +901025288581

Job: Internal IT Coordinator

Hobby: Gunsmithing, Motor sports, Flying, Skiing, Hooping, Lego building, Ice skating

Introduction: My name is Nathanael Baumbach, I am a fantastic, nice, victorious, brave, healthy, cute, glorious person who loves writing and wants to share my knowledge and understanding with you.