Limiting repeater items for mobile site

Would love some help on this please.

I have a repeater for the projects (connected to CMS) on my Wix site. All projects are shown on the project page, it is set to show 6 on the projects section on the homepage, but I want the mobvile site to be limited to 3. What code do I need to do this?

This is the code I have already:

import wixWindowFrontend from 'wix-window-frontend'
if(wixWindowFrontend.formFactor === "Mobile"){
$w('#listRepeater')

}

I just need to know the language to use to limit the items to three? My repeater ID is called ‘listRepeater’

Thank you in advance!

If your REPEATER is driven by a DATASET.

Thanks for your response!

Sorry I’m not a natural coder (though would like to be). I tried the following code but it doesn’t like the ‘setpagesize’.

I also tried ‘limit’ and ‘setlimit’ and ‘item’… Any ideas?

I already can see that this will not really work, if you are using a dataset.

  1. IMPORT-CODE-PARTS should be placed always on very TOP!
  2. $w.onReady() - START-SEQUENCE missing!
  3. $w(‘#dataset’).onReady() - Sequence missing!

And still no info if you have been used a DATASET or not.

Show full code.