You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
1.1 KiB

/** @odoo-module **/
import { Component, onMounted, useRef } from "@odoo/owl";
import { registry } from "@web/core/registry";
import PublicWidget from "@web/legacy/js/public/public_widget";
export const customFashion = PublicWidget.Widget.extend({
selector: "#wrapwrap",
// Create a ref for the banner element
setup() {
this.bannerRef = useRef("bannerElement");
console.log(this.bannerRef);
onMounted(() => {
this.initBanner();
});
},
initBanner() {
const bannerElement = this.bannerRef.el;
if (bannerElement) {
$(bannerElement).owlCarousel({
items: 1,
loop: true,
margin: 40,
stagePadding: 0,
smartSpeed: 450,
autoplay: false,
autoPlaySpeed: 1000,
autoPlayTimeout: 1000,
autoplayHoverPause: true,
dots: true,
nav: false,
animateOut: 'fadeOut'
});
}
}
});
PublicWidget.registry.customFashion = customFashion;