Best golf resorts for buddies: GOLF’s Top 100 Resorts 2019

Some resorts, bless them, are all about golf, golf, golf. They celebrate and share in our passion for the game, offering immersion therapy with multiple courses to play 18, 36, or until you just can’t see the ball anymore. They’re where we hardcore types indulge with like-minded friends, and when our daily golf bender is done, all we want, and get, is on-point efficiency and comfort (and maybe some craft beer) before we get back after it tomorrow.

Without further ado, here are GOLF’s 25 best resorts for Buddies. (For our ranking methodology, scroll to the bottom of this article.)

MORE:  Top 25 Resorts for Luxury  |  Top 25 Resorts for General Excellence  |  Top 25 Resorts for Families

An aerial view of Old Macdonald at Bandon Dunes in Bandon, Ore.
An aerial view of Old Macdonald at Bandon Dunes in Bandon, Ore.

1. Bandon Dunes Golf Resort, Bandon, Ore.

186 rooms, with options that include four-bedroom cottages / six golf courses / six restaurants and bars

Best time to go: Year-round; prioritize the period from late spring to mid-fall, when temps run higher and rain is less frequent.

Daily stay-and-plays start at: Varies wildly, due to replay rates, season and lodging options. Contact the resort.

Golf experience: Four courses, all ranked in GOLF’s Top 100, plus a 13-hole par-3 course, a 100,000-square-foot putting green, and a soon-to-open fifth 18-hole course, Sheep Ranch.

Best non-golf amenity: Beautiful walking trails are scattered around the property. For those who’d rather drink, there’s the Bunker Bar, which keeps the lights on until the wee morning hours.

Insider tip: First, take a caddie. Second, play more than 18 holes per day, if you can — the second round is always half off, and the third round of the day is on the house.

Travelogue: When Bandon Dunes opened in 1999, it was unlike anything golfers had experienced in America — the walking-only directive, the embrace of harsh coastal weather and rugged imperfections were a slap in the face to the cushy frameworks of traditional resorts. The remoteness of its central Oregon locale also raised eyebrows: would it succeed, let alone survive? It struck a chord in players’ hearts that very few knew existed. Twenty years and thousands of additional course acres later, Bandon Dunes is America’s single-greatest destination for golf-loving groups who want nothing more than to tee it up from dawn to dusk. What’s more, Bandon has inspired resorts around the world, both new and established, to rethink what it means to lure avid golfers. There are a variety of accommodations — anywhere from single-occupancy lodge rooms to four-bedroom cottages — that offer the necessary basics. And while a spa exists, it offers but two services. The spirit of the golf at Bandon, too, is rooted in basics, but don’t let that word fool you — the golf may be gritty and stripped-down at times, but the raw spirit and jaw-dropping views that envelop this place make you feel like the luckiest golfer alive. Also good for: General Excellence. Read more here. / (855) 220-6710

Pinehurst No. 2 is among the resort's most popular courses.
Joann Dost

2. Pinehurst Resort, Pinehurst, N.C.

350-plus rooms and condos / nine golf courses / eight restaurants / spa / lawn sports

Best time to go: The fall brings pleasant temperatures without the humidity.

Daily stay-and-plays start at: $450.

Golf experience: Nine courses. How can you beat that?

Best non-golf amenity: Croquet, the way it was meant to be played.

While you’re there: Visit the Ryder Cup Lounge and immerse yourself in golf’s rich history.

Insider tip: Play in the late afternoon — the tall pines and their shadows create an epic canvas.

Travelogue: It’s accepted that St. Andrews is the “Home of Golf.” If that’s the case, the home of American golf is Pinehurst. For some, a trip to the Sandhills is like leaving home for college — golf college. Everything you’d want — all nine(!) courses, housing, dining — is elaborately placed around weaving roads and paths on a sprawling campus, pine straw bordering every turn. The quad in this analogy is just as delightful as your alma mater’s grassy space. It’s made up of an 18-hole putting course named Thistle Dhu that abuts a 9-hole short course named The Cradle, with a grassy perch filled with lawn chairs overlooking it all. A true Pinehurst Day involves all of them — say, 18 on Gil Hanse’s wide-open redesign of No. 4, a wedges-only loop on the short course and settling bets on the putting course. To complete the syllabus, pop in for a pint in the Ryder Cup Lounge or the new Pinehurst Brewing Co. Or, if you made birdie on any of No. 2’s par threes, a free beverage awaits in its 19th hole, the Deuce. Congratulations, graduate. Also good for: General Excellence. Read more here. / (855) 235-8507

A view of the stunning par-3 16th hole at Cabot Cliffs.

3. Cabot Links, Inverness, Nova Scotia, Canada

72-room Cabot Lodge (plus 2- and 4-bedroom Golf Villas) / two golf courses / three restaurants

Best time to go: June through September.

Daily stay-and-plays start at: $255.

Golf experience: Two jaw-dropping layouts, Cabot Links, designed by Rod Whitman, and Cabot Cliffs, designed by Bill Coore and Ben Crenshaw. Ten-hole short course opening in 2020.

Best non-golf amenity: The Public House, featuring live music and local beers on tap, is a central gathering place for locals and guests alike.

While you’re there: Cabot’s adventure program offers a wide range of excursions, including fly fishing, whiskey-tasting tours, beach lobster boils and more.

Insider tip: Use Cabot’s transportation service for a seamless journey from Halifax airport.

Travelogue: When the Cabot Links course opened in 2012, it was hard to imagine a second act ever upstaging Canada’s first true links layout. Then Cabot Cliffs hit the scene, earning GOLF’s choice for Best New Course in 2015. It’s magical, towering over the Gulf of St. Lawrence while taking golfers on a wild ride through pine-studded highlands, valleys and Scottish-style dunes. Cabot Links is a Rod Whitman design built atop a 200-acre sandy strip discovered by resort co-founder Ben Cowan-Dewar — the parcel was meant to house a golf course since creation. Cabot Cliffs may edge out Cabot Links in the rankings, but debates linger (never rage — this is Canada) into the night at the resort’s Public House as to the proper pecking order. The key, here, is not to get hung up on the data, but to soak up the ephemeral experience. This is accomplished by sampling both courses, relaxing in an oceanfront golf villa and savoring fresh local halibut and Nova Scotia lobster at Panorama. Departing Cabot Links, a satisfying smile does set in knowing one has played one of the best four-hole closing stretches in the world. By all accounts, holes 15 through 18 on Cabot Cliffs are the closet thing the Eastern Seaboard has to Cypress Point. Hey, debates aside, what golfer doesn’t keep score? Also good for: General Excellence. Read more here. / (855) 660-6243

A look at sprawling Sand Valley in Wisconsin.

4. Sand Valley Golf Resort Nekoosa, Wis.

65 rooms (lodge, cottages and cabins) / three golf courses / three restaurants / tennis

Best time to go: June through September.

Daily stay-and-plays start at: $180.

Golf experience: Sand Valley and the Sandbox short course, both designed by Coore/Crenshaw; Mammoth Dunes, designed by David McLay Kidd.

Best non-golf amenity: The 15 grass tennis courts.

While you’re there: Wash down Sand Valley’s buffalo cheese curds with a bolt of Spotted Cow from Glarus Brewing.

Insider tip: Sand Valley’s 6-hole loop and the Sandbox (a par-3 course) offer twilight play.

Travelogue: Developer Mike Keiser already had Bandon Dunes and Cabot Links on his résumé when he opened Sand Valley’s doors in 2017, and it could be his greatest achievement. No ocean? No problem. Nearest major airport 2.5 hours away? They will come. Nekoosa? All good — the prehistoric sand dunes of central Wisconsin rise to the occasion. Sand Valley is beautiful and fair with shot values appealing to a broad swath of players. Mammoth Dunes, in contrast, defies the space-time continuum. Its scale is other-worldly, its shot-making demands relentless. You’ll welcome the respite of the resort’s 17-hole short course, which doubles as an architecture lesson with its Biarritz, Lion’s Mouth and Redan greens. A “beer canoe” helps wash away any of the day’s losses. Also good for: General Excellence. Read more here. / (888) 651-5539

A view down a fairway at The Resort at Diamante Cabo San Lucas in Mexico.

5. The Resort at Diamante Cabo San Lucas, B.C.S., Mexico

Estates, Villas, Casitas and Suites / three courses / three restaurants / spa / pool / fitness center

Best time to go: Late May/early June or early December.

Daily stay-and-plays start at: Contact the resort.

Golf experience: The Dunes, a seaside links designed by Davis Love III; El Cardonal, a resort layout by Tiger Woods (design debut); a TGR Design short course.

Best non-golf amenity: A 10-acre, man-made saltwater lagoon, perfect for sailing, swimming or hanging out in your own private cabana.

While you’re there: Satisfy your love of tamales and tequila at the Dunes course comfort stations.

Insider tip: Play Dunes first. It’s the centerpiece of the golfing experience and a layout ranked in the Top 100 in the world.

Travelogue: More than any new Cabo resort, Diamante best maintains the luxury and exclusivity of Cabo’s Hollywood-rich past. No expense is spared in this lavish, private enclave. The amenities are rich, but none can match the marvel that are Diamante’s two oceanside courses. Love’s Dunes course — a thoughtful links layout that meanders through massive dunes next to the Pacific — is the brains. Tiger’s El Cardonal is the beauty, with panoramic ocean views on almost every hole. On both, the mind boggles at how luxurious Cabo can be — and how a place like Diamante even exists. Also good for: Families. Read more here. / (888) 975-9625

Nos. 6–25, A–Z

Arcadia Bluffs, Arcadia, Mich.

Best time to go: Summer for spectacular golf weather and views. Daily stay-and-plays start at: $365. Golf experience: The best-in-class Bluffs course overlooks Lake Michigan; the idyllic South course. Best non-golf amenity: Great Lake Michigan views and food from the dining room, open for three meals a day. While you’re there: Do your research. There are dozens of great courses in the area if you’re looking for multiple rounds and locations. Insider tip: The Cottages, which line the 2nd hole of the Bluffs course, include a private putting green for post-round money matches. Also good for: General Excellence. Read more here. / (800) 494-8666

Barefoot Resort and Golf, N. Myrtle Beach, S.C.

Best time to go: March-May, September-November. Daily stay-and-plays start at: $100. Golf experience: A solid foursome: Pete Dye, Tom Fazio, Greg Norman and Davis Love III. Best non-golf amenity: Barefoot Landing, a maze of boardwalks, shops and restaurants just three minutes away. While you’re there: Warm-up on the 30-acre practice facility. Insider tip: Barefoot offers multi-round packages with discounts for those booking 90 days or more in advance. Also good for: Families. Read more here. / (866) 638-4818

Omni Barton Creek Resort & Spa, Austin, Texas

Best time to go: Spring and fall are the most popular for golf. Daily stay-and-plays start at: Approx. $500. Golf experience: An embarrassment of riches: two courses by Tom Fazio, one by Ben Crenshaw, one off-site by Arnold Palmer. Best non-golf amenity: The new multi-floor Mokara Spa with views of the Texas Hill Country. While you’re there: A visit to 6th Street — the live music capital of Texas — is a must. And don’t miss the nightly bats flying out from the Congress Ave. bridge. Insider tip: If you make it to nearby Texas BBQ shrine Salt Lick, it’s cash only, no exceptions. Also good for: Families. Read more here. / (512) 329-4000

Renaissance Birmingham Ross Bridge Golf Resort & Spa, Birmingham, Ala.

Best time to visit: Spring and fall are best for golf and outdoor activities. Daily stay-and-plays start at: $174. Golf experience: Ross Bridge Golf Course, part of the Robert Trent Jones Trail, is on site. Best non-golf amenity: The Spa at Ross Bridge is a good place to get over a busy day, and the 24-hour fitness center allows you to burn off some excess energy whenever the mood hits. While you’re there: There’s plenty to see and do in Birmingham, including the moving Civil Rights Museum. It’s a great activity for a non-golf break or rainy afternoon. Insider tip: The Ross Bridge Resort is close enough to famous Dreamland BBQ to swing by or call in for a quick plate of ribs, sauce and bread. Also good for: Families. Read more here. / (205) 916-7677

A view of Ross Bridge Golf Course in Birmingham, Ala.

Boyne Golf, Boyne, Mich.

Best time to visit: Summer and early fall for golf; winter for skiing. Daily stay-and-plays start at: $455. Golf experience: Ten golf courses in the Boyne area spread around three resorts. Best non-golf Amenity: There’s plenty of prime fishing in the summer. While you’re there: Check out the quaint downtowns and festivals that take place annually in the Boyne area. Saltwater taffy and ice cream are summer staples. Insider tip: Don’t say you’re in the “Upper Peninsula” or you’ll be quickly corrected. You’re in Northern Michigan, not the UP. Also good for: Families. Read more here. / (855) 688-3286

Caledonia/True Blue Plantation, Pawleys Island, S.C.

Best time to go: Spring and fall, when temperatures are ideal and course conditions are pure. Daily stay-and-plays start at: $100. Golf experience: A pair of engaging layouts by the late, great architect Mike Strantz. Best non-golf amenity: Caledonia’s fish shed, a comfortable venue where private catering can be arranged. While you’re there: Pause at the turn at Caledonia for a bowl of complimentary fish soup, which simmers in a large pot at a comfort station beside the 10th tee. Insider tip: Fishing charters can be booked from Caledonia for outings onto the Waccamaw River. Also good for: Families. Read more here. / (800) 483-6800

Erin Hills, Erin, Wis.

Best time to go: Summer is the perfect time for Wisconsin golf. Daily stay-and-plays start at: $460. Golf experience: Re-create your own Brooks Koepka moment at the 2017 U.S. Open host course. Best non-golf amenity: Irish Pub & Terrace. While you’re there: Get cozy with the caddies in the caddie barn — you won’t forget it. Insider tip: Overnight guests get access to the 5-hole Kettle Loop. Read more here. / (866) 772-4769

Erin Hills, host of the 2017 U.S. Open, has several memorable and challenging golf holes.

Forest Dunes, Roscommon, Mich.

Best time to go: The ideal golf experience here is summer to early fall. Daily stay-and-plays start at: $255. Golf experience: Forest Dunes golf course opened in 2002 to rave reviews; The Loop is one of only two totally reversible layouts in the U.S. Best non-golf amenity: A 45-minute on-site casting class to learn how to properly mine the local fishing lakes. While you’re there: Schedule a full- or half-day float trip on the North or South Branch of the AuSable River. Insider tip: Electric golf carts are now allowed on the reversible Loop course. Also good for: Families. Read more here. / (989) 275-0700

Gamble Sands, Brewster, Wash.

Best time to go: Summer months are longest and warmest — you’ll want to play as much golf as you can on the incredible David McLay Kidd-designed track. Daily stay-and-plays start at: $149. Golf experience: The Sands Course, a links-style stunner, with sandy soil, fine fescue grasses, firm playing surfaces, wide fairways and massive greens. Best non-golf amenity: The Danny Boy Bar & Grill and the 100,000-square-foot Cascade putting course. We know — it’s not a non-golf amenity. But golf is why you come to Gamble Sands. While you’re there: The spectacular Columbia River is close by, as is one of the most popular escapes for Seattle urbanites: Lake Chelan and Chelan Falls. Insider tip: Shots can fly two clubs further due to the thin, desert air. Read more here. / (509) 436-8323

Innisbrook, A Salamander Resort, Palm Harbor, Fla.

Best time to go: Winter months for temps in the 70s and 80s, but shoulder season is also ideal (less crowded and cheaper). Daily stay-and-plays start at: $189. Golf experience: PGA Tour host Copperhead course; Island, North and South courses. Best non-golf amenity: The Salamander Spa, with 12 treatment rooms featuring the Golfers Muscle Melting Massage. While you’re there: Sip a cocktail around the firepits outside Market Salamander Grille and Bar. Insider tip: Make reservations at Packard’s Steakhouse, or you may end up eating at the bar. Also good for: Families. Read more here. / (888) 794-8627

Pine Needles Lodge/Mid Pines Inn, Southern Pines, N.C.

Best time to go: Summer months can be muggy, but it’s also when you’ll find the best deals. Spring — and particularly the fall — is when you’re likely to encounter some incredible scenery and weather. Daily stay-and-plays start at: $135. Golf experience: Pine Needles and Mid Pines (they’re across the street from one another) boast 18-hole Donald Ross gems. Best non-golf amenity: Both resorts are heavily golf-centric, but a favorite hang off the courses is the In-The-Rough Lounge at Pine Needles. While you’re there: We’re not suggesting you leave, but it’s worth mentioning the formidable Pinehurst Resort and its nine courses are but a few miles away. Insider tip: Play the slightly easier Pine Needles first, then Mid Pines in the afternoon. Also good for: General Excellence. Read more here. / (800) 747-7272 (PN) / (800) 323.2114 (MP)

A look at the fairway and green of a hole at Pine Needles in Southern Pines, N.C.

The Prairie Club, Valentine, Neb.

Best time to go: September. There’s a little less wind and the courses play firmer and faster. Daily stay-and-plays start at: $459 (includes unlimited golf, cart, lodging and breakfast). Golf experience: 36 holes of outrageous golf in Nebraska’s beautiful but remote Sandhills region. Best non-golf amenity: Load up a cooler and take a leisurely five-hour float down the Niobrara River. While you’re there: Take on the Old Wagon putting course, a funky layout with giant slopes overlooking the Snake River Canyon. A club shuttle drops you off and picks you up. Insider tip: There are no replay fees, which means, in summer, there’s enough light to comfortably play up to 72 holes at no extra cost. Oh, and at dinner in the main lodge, don’t ask for the specials. Get the steak. This is cattle country. Also good for: General Excellence. Read more here. / (888) 402-1101

Pursell Farms, Sylacauga, Ala.

Best time to visit: Spring and fall are the best time for golf and outdoor activities. Daily stay-and-plays start at: $255. Golf experience: A clever Hurdzan-Fry design on a former family farm. Best non-golf amenity: Who doesn’t want to embrace their inner country roots with a visit to the gun range? While you’re there: If you come in the fall, play a full 18 at Pursell then take resort transportation to nearby Auburn University to see the Tigers play before 85,000 rabid fans. Insider tip: The resort is the family homestead of David and Ellen Pursell. If you ask nice enough, they might give you a personal home tour or an Orvis fishing or shooting trip. Also good for: Families. Read more here. / (877) 292-3276

Sawgrass Marriott Golf Resort & Spa, Ponte Vedra Beach, Fla.

Best time to go: For best course conditions, tee it up in late March and early April (right after The Players Championship); lowest rates can be found during the sticky summer months. Daily stay-and-plays start at: $575. Golf experience: Play where the pros play at TPC Sawgrass Stadium Course, but don’t overlook the adjacent Valley Course, also by Pete Dye. Best non-golf amenity: The 20,000-square-foot spa. While you’re there: The World Golf Hall of Fame is just 30 minutes south in St. Augustine. Insider tip: Guests have the exclusive opportunity to book a tee time up to a year in advance at TPC Sawgrass. Also good for: General Excellence. Read more here. / (904) 285-7777

Streamsong Resort, Bowling Green, Fla.

Best time to go: Fall and spring (summer temperatures reach the 90s consistently). Daily stay-and-plays start at: $500. Golf experience: Three Top-100 rated courses, designed by Tom Doak (the Blue), Coore/Crenshaw (the Red) and Gil Hanse (the Black). Best non-golf amenity: Guided bass fishing. While you’re there: Try your hand at archery, a sport you just don’t find everywhere. Insider tip: Order the grouper sandwich from Restaurant Fifty-Nine. Also good for: General Excellence. Read more here. / (888) 294-6322

Streamsong Resort has three 18-hole courses and isn't short on creative golf holes.

Sunriver Resort, Sunriver, Ore.

Best time to go: Summer months are the heyday at Sunriver and the best time to go with long days and plenty of sunshine. Daily stay-and-plays start at: $179. Golf experience: Four spectacular courses, including the venerable Crosswater, the pristine Meadows course, the testy Woodlands course and the family friendly, 9-hole Caldera Links. Best non-golf amenity: Rafting, canoeing, kayaking or paddle boarding on the majestic Deschutes River. While you’re there: Drive 20 minutes from Sunriver to discover Paulina Falls, a double waterfall that drops 80 feet over volcanic cliffs onto a jumble of rocks. The falls are surrounded by towering conifers, just west of Paulina Lake and the Newberry Caldera. It’s breathtaking. Insider tip: Downtown Bend frequently hosts summer music and beer festivals — plan your trip accordingly and you can catch some phenomenal talent passing through. Also good for: General Excellence. Read more here. / (855) 420-8206

Talking Stick, Scottsdale, Ariz.

Best time to go: Between Thanksgiving and Christmas, when the weather is good and rates are lower than the peak season of January through March. Daily stay-and-plays start at: $176. Golf experience: 36 holes at Talking Stick Golf Club were designed by Bill Coore and Ben Crenshaw. Best non-golf amenity: Fine dining and killer sunset views at Orange Sky on the resort’s 15th floor. While you’re there: Salt River Fields at Talking Stick hosts spring training for the Arizona Diamondbacks and Colorado Rockies, a short drive from resort. Insider tip: One of the world’s most popular TopGolf locations is within walking distance; mention you’re staying at the resort for potential special offers. Also good for: General Excellence. Read more here. / (480) 850-7777

Trump National Doral Miami, Miami, Fla.

Best time to go: Year-round, but the weather in winter is often fabulous, especially considering what the rest of the country is enduring at that time. Daily stay-and-plays start at: $255. Golf experience: Four courses, including the famed Blue Monster, a former PGA Tour stop and one of the toughest and most exciting courses in Florida. If the Sunshine State were to host a U.S. Open, it’d be on the Blue. Best non-golf amenity: The American Wagyu ribeye or a 28-day dry-aged Porterhouse steak, both served at BLT Prime overlooking the Blue Monster. While you’re there: Pamper yourself with up to 100 different spa offerings at the Trump Spa, and spend some time to relax at the Royal Palm Pool oasis. Insider tip: Trump National Doral Miami offers memberships, including a full-golf membership that allows unlimited access to all courses at the resort. Also good for: General Excellence. Read more here. / (800) 713 6725

Turning Stone Resort & Casino, Verona, N.Y.

Best time to go: Turning Stone is a four-season resort, but we love central New York in September-October, when summer turns to fall and the leaves turn with it. Daily stay-and-plays start at: $362. Golf experience: Turning Stone boasts some of the best public golf in the Northeast, and is regularly featured among GOLF’s Top 100 Courses You Can Play. Best non-golf amenity: The casino and surrounding shows and nightlife have so much to offer you don’t need to touch a single chip to get your money’s worth. While you’re there: Settle in and enjoy! This is a destination resort — there’s more than enough to do on the sprawling property. Insider tip: Save some time for Sandstone Hollow, Turning Stone’s nine-hole par-3 course, which winds through woods, wetlands and wild fescue. Also good for: Families. Read more here. / (800) 771-7711

Villa del Palmar Beach Resort & Spa / TPC Danzante Bay, Loreto, B.C.S., Mexico

Best time to go: November to May; it’s a little cooler and best time to catch whales passing by in the Gulf of California. Daily stay-and-plays start at: $298. Golf experience: Imagine Sedona, Ariz., crashing into the sea — that’s TPC Danzante Bay. Although architect Rees Jones is better known as a U.S. Open course renovator than as a creator of singular golf holes, he certainly achieved the latter here at No. 17, where he built one of the world’s most stunning par 3s. The downhill tee shot to a sliver of green placed on top of a rocky peninsula hovering above the Sea of Cortez is unforgettable. Best non-golf amenity: Get on a boat and explore the Bay of Loreto National Park, a UNESCO World Heritage site. While you’re there: There’s a hidden disco on the property (in a yurt, no less) open on weekends only. Insider tip: Check the Alaska Air flight schedule from LAX to Loreto; it’s the only way to get here directly from the states. Also good for: Families. Read more here. / (800) 790-4187

How we ranked them

In one of the biggest editorial projects GOLF has ever attempted, we culled the names of 243 rank-worthy resorts spread across North America. Under the expert guidance of resort industry veterans and our stable of well-heeled travel writers, we placed each resort into at least one of four experience categories: Luxury, Buddies, General Excellence and Families. Then, with the help of 3,700-plus golfers just like you, we conducted an online poll, asking readers to rate each resort based on five key variables: golf experience, accommodations, service, food and ambience. The results of this poll were then weighed against the opinions of a select group of GOLF’s Top 100 Courses panelists and those of internal travel and editorial teams to list destinations in each category (Nos. 1–5, then alphabetically), generating GOLF’s first-ever ranking of the Top 100 Resorts. Yep — we’re in need of a vacation, too.

').insertAfter(videoContainer.find('.video-info')); jQuery("
").insertAfter(videoContainer) } } // +++ When sticky video is closed. jQuery(document).on('click', '.sticky-close', function() { stickyClosed = true; player.pause(); if (player.ima3.adPlayer) { player.ima3.adPlayer.pause(); } jQuery('.video').removeClass("sticky-video"); jQuery('.sticky-video-placeholder').remove(); jQuery('.sticky-close').remove(); }); // +++ Checks if player is in view +++ function isScrolledIntoView(elem) { // Get the position of the viewport var docViewTop = jQuery(window).scrollTop(); var docViewBottom = docViewTop + jQuery(window).height(); // get the position of the player element var elemTop = jQuery(elem).offset().top; var elemBottom = elemTop + jQuery(elem).height(); // Determine if the player element is in fully in the viewport return ( elemTop = docViewTop ); } // +++ Set Boolean value for if ad is playing +++ player.on( [ "ads-ad-started", "ads-ad-ended", "ima3-complete", "ads-ad-skipped", "adserror", "ads-allpods-completed" ], function(evtObject) { if (player_id === 'XEdEA6gKO') { if (evtObject.type == "ads-ad-started") { isAdPlaying = true; console.log('ad is playing'); } else { isAdPlaying = false; console.log('ad is not playing'); } } } ); }); }); })(jQuery);