function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Can you please Help Me?

Hi all,

I am took one VF Page and I am taking One image tag in page? I have 4 images in Static Resource. I have to rotate each image in 30 secs. How to roate each image. How to wrote the apex class?


Thanks for u r help.....



Hi Ajay,


First you need to collect image url for all images in a list. And use the <apex:actionPoller> tag in page. In this tag you can set time interval to after how mauch time it will be rerender.

Example - In the below code we using counter that will increment after 15 seconds.


<!--  Page -->
<apex:page controller="exampleCon">
        <apex:outputText value="Watch this counter: {!count}" id="counter"/>
        <apex:actionPoller action="{!incrementCounter}" rerender="counter" interval="15"/>
/***  Controller: ***/
public class exampleCon {
    Integer count = 0;
    public PageReference incrementCounter() {
        return null;
    public Integer getCount() {
        return count;
Chamil MadusankaChamil Madusanka

Use Jquery rotate. It will be  fast.


If a reply to a post answers your question or resolves your problem, please mark it as the solution to the post so that others may benefit.