Go to Post My first instinct was inflatable clowns and 5 of them beating on the robots at all times, but then I thought, thats probably not right. - Dan Richardson [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rating: Thread Rating: 15 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 22-04-2014, 19:58
Cyan's Avatar
Cyan Cyan is offline
Vegeta SSJ4
AKA: Sayan Dutta
FRC #2642 (Pitt Pirates)
Team Role: Programmer
 
Join Date: Apr 2014
Rookie Year: 2014
Location: Utopia
Posts: 27
Cyan is an unknown quantity at this point
Re: Code Help

If Isaac's jQuery info works for you, that's fine. Considering you have an image map, here's some simplified skeleton code:
Code:
<img id="navigation" src="first.gif" alt="FIRST" usemap="#map">

<map name="map">
  <area shape="rect" coords="0,0,50,50" href="javascript:openLink(link1);" alt="link1">
  <area shape="rect" coords="50,50,100,100" href="javascript:openLink(link2);" alt="link2">
  <area shape="rect" coords="100,100,150,150" href="javascript:openLink(link3);" alt="link3">
</map>

<script>

function openLink (link) {
   document.getElementbyId("navigation").animate(height:>enter small height<px, width:>enter small width<px);
   window.open("www.example.com/"+link,"_self")
}

</script>
I may not be the best coder, but you may want to try that. There's probably bugs all through this, but if you can find the small mistakes you can fix them.

This code uses the .animate() function from jquery's libraries, so you will need to download the libraries for use: jquery.com .

If there's still confusion or there's a mistake (which I make a lot), again, please clarify. Good luck on your website.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 00:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi