Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 766897
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T17:07:20+00:00 2026-05-14T17:07:20+00:00

I downloaded jquery effects example and all effects are appearing only onclick but i

  • 0

I downloaded jquery effects example and all effects are appearing only onclick but i want it to be executed on document.ready() and continue…

<script type="text/javascript">
 var ImgIdx = 2;//To mark which image will be select next

 function PreloadImg(){
  $.ImagePreload("images/im2.jpg");
  $.ImagePreload("images/im3.jpg");
  $.ImagePreload("images/im4.jpg");
  $.ImagePreload("images/im5.jpg");
 }
 $(document).ready(function(){
  PreloadImg();
  $(".SlashEff ul li").click(function(){
  $(".Slash").ImageSwitch({Type:$(this).attr("rel"),      NewImage:"images/im"+ImgIdx+".jpg", speed: 4000
          });
   ImgIdx++;
   if(ImgIdx>5) ImgIdx = 1;
  });  
 });
</script>

and my

<div class="SlashEff">
 <ul>
 <li class="TryFadeIn" rel="FadeIn">Fade in</li>
  <li class="TryFlyIn"  rel="FlyIn">Fly in</li>
 <li class="TryFlyOut"  rel="FlyOut">Fly out</li>
 <li class="TryFlipIn"  rel="FlipIn">Flip in</li>
 <li class="TryFlipOut"  rel="FlipOut">Flip out</li>    
 <li class="TryScroll"  rel="ScrollIn">Scroll in</li>
 <li class="TryScroll"  rel="ScrollOut">Scroll out</li>
 <li class="TrySingleDoor" rel="SingleDoor">Single Door</li>
 <li class="TryDoubleDoor" rel="DoubleDoor">Double Door</li>
</ul>  
</div>

Here is the link http://www.hieu.co.uk/blog/index.php/imageswitch/

I tried this,

$(document).ready(function(){
  PreloadImg();
    $(".Slash").ImageSwitch({Type:$(this).attr("rel"), 
           NewImage:"images/im"+ImgIdx+".jpg", speed: 4000
          });
   ImgIdx++;
   if(ImgIdx>5) ImgIdx = 1;
 });

I tried this but it gets executed only once…. I want to execute this every 5000ms… Is this possible…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T17:07:21+00:00Added an answer on May 14, 2026 at 5:07 pm

    You can use setInterval to achieve the repeat:

    function swap() {
      $(".Slash").ImageSwitch({Type:$(this).attr("rel"), 
        NewImage:"images/im"+ImgIdx+".jpg", speed: 4000
      });
      ImgIdx++;
      if(ImgIdx>5) ImgIdx = 1;
    }
    $(document).ready(function(){
      PreloadImg();
      setInterval(swap, 5000);
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Someday i've downloaded a very nice jquery editor but i lost it and i
On document ready I run this code: jQuery(document).ready(function(){ jQuery('#button').click(function() { jQuery('#contact_form').load(/Users/mge/Downloads/jquery-ajax-1/readme.txt); return false; });
I have downloaded the JQuery plugin EasySlider1.7 . I have the basics working but
This doesn't indicate any error in my javascript code, but in the downloaded jquery.js
I downloaded http://code.google.com/chrome/extensions/samples.html#ea2894c41cb8e80a4433a3e6c5772dadce9be90d . I would like make it it jQuery, but if i
I want to fall in love with jQuery UI's positioning feature but everytime I
I downloaded JQuery UI and added the script to my solution, and with a
I downloaded a jquery collapsible panel script (used as a menu), which I've got
I have downloaded the jquery scroll script (http://www.position-absolute.com/articles/better-html-anchor-a-jquery-script-to-slide-the-scrollbar/) which will scroll to your anchor
I'm a complete noob to JQUERY, learning things slowly. But I have been downloaded

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.