Next.js website for Rocky Mountain Vending company featuring: - Product catalog with Stripe integration - Service areas and parts pages - Admin dashboard with Clerk authentication - SEO optimized pages with JSON-LD structured data Co-authored-by: Cursor <cursoragent@cursor.com>
10 lines
No EOL
380 B
Text
10 lines
No EOL
380 B
Text
/**
|
|
* Checks if a given element has a CSS class.
|
|
*
|
|
* @param element the element
|
|
* @param className the CSS class name
|
|
*/
|
|
export default function hasClass(element, className) {
|
|
if (element.classList) return !!className && element.classList.contains(className);
|
|
return (" " + (element.className.baseVal || element.className) + " ").indexOf(" " + className + " ") !== -1;
|
|
} |