Welcome Guest Search | Active Topics | Sign In | Register

ImageZoom Question Options
Augie
Posted: Wednesday, July 22, 2009 4:41:20 PM
Rank: Member
Groups: Member

Joined: 6/19/2009
Posts: 12
I was wondering if there was a way to trigger the image zoom from a text link as opposed to the small image? For instance there could be a link like "View Picture" which when clicked would zoom the picture into view.
eo_support
Posted: Wednesday, July 22, 2009 4:49:47 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Yes. You can do that. You would start from this sample:

http://demo.essentialobjects.com/Default.aspx?path=ImageZoom\_i1\_i2

This sample demonstrates how to trigger the image zoom from JavaScript code. A simplied version is:

Code: HTML/ASPX
<div onmouseover="eo_GetObject('ImageZoom1').zoomIn();">test</div>


In this sample the code:

Code: JavaScript
eo_GetObject('ImageZoom1').zoomIn();


is triggered by "mouse over" event. You would use the same code but trigger it differently. For example, you can trigger it from click event:

Code: HTML/ASPX
<div onclick="eo_GetObject('ImageZoom1').zoomIn();">test</div>


Or from a link:

Code: HTML/ASPX
<a href="javascript:eo_GetObject('ImageZoom1').zoomIn();">test</a>


Hope this helps.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.