...

View Full Version : How to do this or where to get a tutorial...



nurmix2
07-06-2011, 07:43 PM
I'm going to give you a few websites that have the same thing.
1.) http://www.cruises.com/
2.) http://www.ou.edu/
3.) http://www.target.com/

They each have that box with a series of numbers. You can click each number to see a new ad and if you like that ad you can click on it to go to another page. Even if you don't click on a number the box slide shows through them.

My questions are...
What kind of coding is that called?
Is there a certain program I need for it?
And...Does anyone know how to do it or where I can find a tutorial?

alykins
07-06-2011, 07:57 PM
i don't know where to get a tut on how to do it; nor did i verify that they are doing it this way, but to me that is a simple javascript function that changes the background image pending an "index" which they are always incrementing based on a timescale, AND the user can click the button and send the index to the function (changing the image immidiatly<-- god my spelling is so horrid*). anyways- to direct you i would begin with learning javascripting. what you will want to do is set up a "demo" "test" "whatever" for yourself that has a div, and some buttons. work on learning how to change the background color of the div based on a call to a js function. this will be a js forum question- they (as I) will not write it all for you, but we can guide you :D
so you can have a div and set it's id. then call a function... below is some "sample" code. it's off the top of my head and does not incorporate all the things you will need to learn/do- but its a stat point..


<div id="change"></div>
<button onclick="colors(1)"/>
<button onclick="colors(2)"/>

function colors(index){
if (index == 1)
document.getElementById(change).style.background="blue";
if (index == 2)
document.getElementById(change).style.background="orange";
}

w3schools has some good tutorials... i think people have posted a site called tzigzag (or something idk) and i think there's and html dog website as well. these offer good places to start to learn how things work and how to code etc

xFinaLx
07-06-2011, 08:31 PM
I'm going to give you a few websites that have the same thing.
1.) http://www.cruises.com/
2.) http://www.ou.edu/
3.) http://www.target.com/

They each have that box with a series of numbers. You can click each number to see a new ad and if you like that ad you can click on it to go to another page. Even if you don't click on a number the box slide shows through them.

My questions are...
What kind of coding is that called?
Is there a certain program I need for it?
And...Does anyone know how to do it or where I can find a tutorial?

Those are pretty much Javascript sliders. Check this out:
http://nivo.dev7studios.com/

doriangray
07-07-2011, 12:04 AM
i would start with jquery and modify it to your needs.

grittykitty
07-07-2011, 03:13 AM
I second the use of jquery. It has served me extremely well for my own website (see the slider at the top of this Lansing Computer Repair (http://www.digitalctrl.org) page).

One thing I love about jquery is that it's updated quite regularly and by a community of great developers. :)

alykins
07-07-2011, 04:28 AM
JQuery is great... but please, for the love of God, if you are going to use it, read how it works instead of "tweaking" it and breaking it and then trying to figure out why everything went to H in a handbasket

nurmix2
07-07-2011, 05:13 PM
Thank you for all the help.
I find myself LOST with jQuery.
I'm working on the webpage for a small family owned business that I work at and am not amazing with HTML or coding.
I get most basic HTML and how to edit it but Im just so lost with jQuery.
Does anyone know if theres a similar alternative simpler method?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum