Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation How to do this or where to get a tutorial...

    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?

  • #2
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,722
    Thanks
    41
    Thanked 191 Times in 190 Posts
    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
    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..

    Code:
    <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

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #3
    New Coder
    Join Date
    May 2011
    Posts
    79
    Thanks
    3
    Thanked 4 Times in 4 Posts
    Quote Originally Posted by nurmix2 View Post
    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/
    Quote Originally Posted by bullant View Post
    Basically - Java is to Javascript as Ham is to Hampster.

  • #4
    New to the CF scene
    Join Date
    Jun 2011
    Posts
    9
    Thanks
    0
    Thanked 1 Time in 1 Post
    i would start with jquery and modify it to your needs.

  • #5
    New Coder
    Join Date
    Jul 2011
    Location
    Detroit
    Posts
    13
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 page).

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

  • #6
    Senior Coder alykins's Avatar
    Join Date
    Apr 2011
    Posts
    1,722
    Thanks
    41
    Thanked 191 Times in 190 Posts
    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

    I code C hash-tag .Net
    Reference: W3C W3CWiki .Net Lib
    Validate: html CSS
    Debug: Chrome FireFox IE

  • #7
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •