Best Finance Degree Programs of 2024 - Intelligent (2024)

People with finance degrees enjoy flexibility in their careers, whether they’re seeking jobs in banking, business, or any other industry that involves financial transactions. The median annual wage for graduates of finance degree programs was $76,850 in 2022, 40% higher than the median annual wage of $46,310.

Students in finance degree programs apply mathematical concepts and statistics to financial analysis, financial planning, accounting, risk management, and fiscal policy — all skills they’ll later use in various finance careers. The average cost of a four-year finance degree is $16,618, depending on the program and institution you choose. Many graduates go on to complete a postgraduate degree in finance, which can cost around $19,749 and take another one to two years.

How to Choose a Finance Degree Program

Choose your area of study

Because the scope of finance careers spans so many industries, your area of study depends on the career you have in mind. Finance students’ undergraduate degrees include an Associate of Science (AS) and a Bachelor of Science (BS) in finance. For postgraduate degrees, choose between a Master of Finance (MFin), a Master of Science in Finance (MSF), or a Master of Business Administration (MBA) with a concentration in finance.

  • An AS in finance covers the basics of finance. It takes two years to earn and prepares students for careers as bookkeepers, credit analysts, accounting clerks, mortgage brokers, or loan officers.
  • Graduates of four-year BS programs learn more about financial analysis and risk management for careers as financial planners, real estate agents, actuaries, insurance agents, and accountants.
  • An MFin or MS in finance are strong options for students who prefer finance-specific courses or careers based on advanced mathematic principles.
  • An MBA in finance provides students with more coursework on business and management principles for flexible careers within the business world.

Consider professional certifications when you choose your area of study. Many graduates of finance degree programs pursue certifications to become a Certified Public Accountant (CPA), Financial Risk Manager (FRM), or Certified Financial Planner (CFP).

Research schools and programs

When choosing a school for your finance degree program, make sure it’s a regionally accredited institution so that your credits and degrees are transferable to other schools. Consider programs that are accredited by independent organizations like the Association to Advance Collegiate Schools of Business (AACSB) and the Accreditation Council for Business Schools and Programs (ACBSP). Programmatic accreditation ensures that they provide valuable and transferable degrees to their students.

Analyze your schedule and needs before narrowing down a list of potential finance degree programs. Determine which schools offer full-time versus part-time programs. If you plan to attend in person, find out if the school provides on-campus housing or if you will need to find your own accommodations.

Next, consider your career goals and interests, and determine which schools offer courses that you’ll find interesting. Contact an admissions counselor or program representative for more information, or attend open houses — either in-person or virtual — to learn more about the program’s course offerings. If possible, visit the schools you’re considering and sit in on a finance class during your visit.

Prepare for tests and applications

Finance degree programs can be competitive, so prepare your admission materials as thoroughly — and promptly — as possible. Gather letters of recommendation from teachers, advisors, and employers in your desired career field. Request sealed transcripts of prerequisite programs as soon as possible to ensure they arrive before the admissions deadline.

Applying for a finance degree program is an excellent time to put together your resume and CV, both of which you’ll use regularly in your career. Emphasize financial skills, courses, and work experience that sets you apart from fellow prospective students.

For AS and BS finance degree programs, ensure that your SAT and ACT scores meet the minimum requirements of your school’s admissions — especially the math portion. Students pursuing postgraduate degrees should take graduate admissions tests such as the GRE or GMAT (for MBA programs) as soon as possible in case they need time to retake them for a higher score.

Select your program

To choose between finance degree programs, consult your list of needs and priorities. Which program offers the specializations you’re seeking for a financial career? Does either program offer financial aid or scholarships? Which program’s prestige would make your resume stand out when applying for your future job?

If possible, talk to graduates from each educational institution. Listen to their experiences of campus life and academic courses. Research professors in each prospective program and read their books. Which academic experience will be the best fit for you?

Determine how you’ll pay for your degree

Create a budget for your projected expenses during your finance degree program. Include tuition, housing, transportation, and other costs associated with starting a new degree. Factor in learning materials, such as books, prerequisite courses, testing fees, and transcript costs.

Once you’ve listed your expenses and chosen your institution, it’s time to find a way to pay for it. Fill out the Free Application for Federal Student Aid (FAFSA) form to see how much financial aid you qualify for. If you currently work in the financial sector, ask about employer tuition assistance. Talk to your school’s financial aid officer for information about grants and scholarships that don’t need to be repaid after graduation.

Best 50 Accredited Finance Degree Programs

Best Finance Degree Programs of 2024 - Intelligent (1)
01The University of Texas at Austin
01MIT Sloan School of Management
01Carnegie Mellon University
01UF Warrington College of Business
01University of Wisconsin - Madison
01University of Illinois at Urbana - Champaign
01Ohio State University
01Bentley University
01Penn State University
01University of North Georgia
01University of Notre Dame
01Washington University In St. Louis
01Indiana University
01Santa Clara University
01Minot State University
01Thomas Edison State University
01Georgetown University
01Delta State University
01Dickinson State University
01The University of Texas Permian Basin
01BYU Marriott School of Business
01Drake University
01Southeast Missouri State University
01Wake Forest University
01Dalton State College
01Lehigh University
01CUNY Brooklyn College
01Villanova University
01Brigham Young University - Idaho
01Northeastern State University
01Harris-Stowe State University
01Case Western Reserve University
01Tulane University of Louisiana
01SMU Cox School of Business
01University of Minnesota
01GW School of Business
01University of Connecticut
01University of Maryland
01University of Miami Herbert Business School.
01University of Delaware
01Michigan State University
01University of Washington Foster School of Business
01Creighton University
01Texas Christian University
01Purdue University
01Miami University
01Virginia Tech
01University of Iowa
01University of South Carolina

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 Finance Degree Programs of 2024 - Intelligent (2024)
Top Articles
Latest Posts
Article information

Author: Stevie Stamm

Last Updated:

Views: 5861

Rating: 5 / 5 (60 voted)

Reviews: 91% of readers found this page helpful

Author information

Name: Stevie Stamm

Birthday: 1996-06-22

Address: Apt. 419 4200 Sipes Estate, East Delmerview, WY 05617

Phone: +342332224300

Job: Future Advertising Analyst

Hobby: Leather crafting, Puzzles, Leather crafting, scrapbook, Urban exploration, Cabaret, Skateboarding

Introduction: My name is Stevie Stamm, I am a colorful, sparkling, splendid, vast, open, hilarious, tender person who loves writing and wants to share my knowledge and understanding with you.