My code is working in preview, but no working when published.

@russian-dima Thanks you!! I Solve the problem in the other way, more simple than that!

I only use the begining of your code:
$w.onReady(()=>{
and put all the code again, and start to work in desktop version ‘-’, only this.

the final code is:

$w.onReady(()=>{

let mySlides = $w( “#fullWidthSlides4” ).slides;

let numSlides = mySlides.length; // 7
let firstSlideName = mySlides[ 0 ].name;}) // “Slide 1”

export function image22_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 1 )}
//
export function button11_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 0 )}

export function button12_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 0 )}

export function image24_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 2 )}

export function button13_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 0 )}

export function image25_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 3 )}

export function button14_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 0 )}

export function image26_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 4 )}

export function button15_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 0 )}

export function image28_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 5 )}

export function button16_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 0 )}

export function image23_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 6 )}

export function button17_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 0 )}

export function image27_click(event){
$w( “#fullWidthSlides4” ).changeSlide( 7 )}

So if you are reading this, remember to use the on ready function in your site!
That save my life! Thank you so much!