Go to Post Theory is when you know everything but nothing works. Practice is when everything works but you don't know why. On our team, theory and practice comes together. Nothing works and nobody knows why. - CalTran [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

 
 
 
Thread Tools Rating: Thread Rating: 15 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 22-04-2014, 19:00
Isaac's Avatar
Isaac Isaac is offline
Registered User
FRC #0488
 
Join Date: Mar 2013
Location: Seattle
Posts: 3
Isaac is an unknown quantity at this point
Re: Code Help

The best way to accomplish this is to use JQuery to select the image, make it smaller, then redirect the window to the page you want. If you haven't heard of JQuery, it's basically a library and set of utilities that sits on top of stock JS to accomplish many common patterns in Javascript. It is widely used in the web development industry and allows you to avoid using a lot of boilerplate code and makes more complex animation and AJAX trivial. Here's a link to the API docs.

From what it sounds like, you have a large image that you want to shrink with animation and then redirect the browser to another page. Without seeing your code exactly or knowing your specific use case, it is difficult to provide a lot of help, but I'll try. It would be helpful if you uploaded it.

Use the
Code:
.click()
method in JQuery to trigger a
Code:
.animate()
method that modifies the CSS of the image to the state you want. Then call the standard Javascript
Code:
window.open("URL")
or
Code:
window.location.href("URL")
to load the new page.

I hope that answers your question, but again, it's tough to give specific feedback without the code you already have. Good luck with your website!
__________________
-Isaac
 


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 17:03.

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