Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
Thread Tools Display Modes
Share |
  #1  
Old 07-25-2016, 01:11 AM
Lahori_Munda's Avatar
Lahori_Munda Lahori_Munda is offline
Contributing Member
 
Join Date: 07-02-10
Location: Pakistan
Posts: 169
iTrader: 0 / 0%
Need to Edit Javascript

Hello,
Well I found this java code and I need to add in these things.

1- Fade Effect
2- Want to show images with 2 columns, means I will add 10 images. 5 Images will show on 1st col and 5 images will show in 2nd col.
3- Want to add Text for every picture e.g. Name and Price
4- Mouse over image changing stop

Can anyone help with this code. I really appreciate your help.

PHP Code:
 <script>
        var 
links = [
        
"http://www.abc.com",
        
"http://www.def.com",
        
"http://www.ghi.com",
        
"http://www.gh22i.com"
        
];
        var 
images = [
        
"https://dmcfebaedy6rh.cloudfront.net/product/front/white/spl5596.360x180.1443167798.jpg",
        
"https://dmcfebaedy6rh.cloudfront.net/product/front/white/mt6050.360x180.1430798334.jpg",
        
"https://dmcfebaedy6rh.cloudfront.net/product/front/white/pl5087.360x180.1423189940.jpg"
        
"https://dmcfebaedy6rh.cloudfront.net/product/front/white/spl5596.360x180.1443167798.jpg"
        
];
        var 
0;
        var 
renew setInterval(function(){
            if(
links.length == i){
                
0;
            }
            else {
            
document.getElementById("bannerImage").src images[i]; 
            
document.getElementById("bannerLink").href links[i]; 
            
i++;

        }
        },
5000);
        
</script>



<a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;">
<img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg">
</a> 

Last edited by Lahori_Munda; 07-25-2016 at 01:22 AM.
 
Reply With Quote

Advertisement

Advertisement

  #2  
Old 10-02-2016, 07:32 PM
jermain08 jermain08 is offline
Contributing Member
 
Join Date: 09-23-16
Posts: 54
iTrader: 0 / 0%
HTML Code:
<script> var links = [ "http://www.abc.com", "http://www.def.com", "http://www.ghi.com", "http://www.gh22i.com" ]; var images = [ "https://dmcfebaedy6rh.cloudfront.net/product/front/white/spl5596.360x180.1443167798.jpg", "https://dmcfebaedy6rh.cloudfront.net/product/front/white/mt6050.360x180.1430798334.jpg", "https://dmcfebaedy6rh.cloudfront.net/product/front/white/pl5087.360x180.1423189940.jpg", "https://dmcfebaedy6rh.cloudfront.net/product/front/white/spl5596.360x180.1443167798.jpg" ]; var i = 0; var renew = setInterval(function(){ if(links.length == i){ i = 0; } else { document.getElementById("bannerImage").src = images[i]; document.getElementById("bannerLink").href = links[i]; i++; } },5000); </script> <div style="width: 370px; float:left"> <a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;"> <img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg"> </a> <a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;"> <img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg"> </a> <a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;"> <img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg"> </a> <a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;"> <img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg"> </a> </div> <div> <a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;"> <img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg"> </a> <a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;"> <img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg"> </a> <a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;"> <img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg"> </a> <a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;"> <img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg"> </a> <a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;"> <img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg"> </a> <a id="bannerLink" href="http://www.abc.com" onclick="void window.open(this.href); return false;"> <img id="bannerImage" src="https://d37j5ujucg66b1.cloudfront.net/product/front/white/pl5393.360x180.1456885745.jpg"> </a> </div>
2 columns with 5 images each
 
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Javascript: I cant edit my page PLEASE HELP!! clickbanners Coding Forum 4 04-14-2007 10:25 AM
Edit Signature Edit Box in vBulletin John Scott Coding Forum 4 11-01-2006 01:56 PM
Count-up from a particular year + Javascript within Javascript? Help! Azam.net Coding Forum 3 06-06-2005 06:47 AM


V7N Network
Get exposure! V7N I Love Photography V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 04:52 PM.
Powered by vBulletin
Copyright 2000-2014 Jelsoft Enterprises Limited.
Copyright © 2003 - 2018 VIX-WomensForum LLC