Help a newbie! make one part of image clickable.

by Roy05
3 replies
  • WEB DESIGN
  • |
Hello all

I'm new at coding I know the basics and I'm now working on a landing page.

So ...

I made a landing page in photoshop its 775px by 400px and Now i want to make the button i designed to be clickable. I tried to put a Div over the button and a href the Div but that did not work.


Ohh and I'm working in dreamweaver i don't know if that matters. can anyone help me out?

cheers Roy
#clickable #image #make #newbie #part
  • Profile picture of the author Andrew H
    Put a div over the image of your button and then use jquery click event?

    Code:
    <div id="clickhere">
    
    </div>
    
    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script type="text/javascript">
    $('#clickhere').click(function() {
       window.location.href = "http://warriorforum.com";
    });
    </script>
    http://jsfiddle.net/9Jbfs/


    OR, the better way, is to just style the button with css and position it properly on the image.
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[8600625].message }}
  • Profile picture of the author Roy05
    Hey Andrew thanks for your fast answer!

    As i said i'm quite the newbie and have't gotten to java script yet.

    I'm not quite sure what this part of the script means:

    //make sure to include jquery library before the script


    Thanks alot
    {{ DiscussionBoard.errors[8600705].message }}
  • Profile picture of the author Andrew H
    it just meant that you needed to have the jquery JS library loaded. I changed it so it will load from the google CDN.
    Signature
    "You shouldn't come here and set yourself up as the resident wizard of oz."
    {{ DiscussionBoard.errors[8601198].message }}

Trending Topics