Enlarge image when mouseover
In storybuilder or pagebuilder, what do I need to do to get an image to enlarge when the mouse hovers over it?
Comments
-
Probably the easiest solution would be to do a regular javascript image swap. Just make the two images be 'regular size' (with some extra border) and 'large size' - but actually make both the same dimensions. (Which is 223x39 pixels in my example link.)
Here's a link to my site that is using a nice JS image swap script.
http://www.heroesforlife.org/changemakers_2010_home
The key parts are this script...
<script language="JavaScript" type="text/javascript">
<!--//
browserok = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3)) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=3)));
if(browserok)
{
getabagOn = new Image(223, 39);
getabagOn.src="../_wrappers/changemakers/2010/button-getabag-on.gif";
getabagOff = new Image(223, 39);
getabagOff.src="../_wrappers/changemakers/2010/button-getabag-off.gif";
}
function mouseOn(imgName)
{
if(browserok)
{
imageOn = eval(imgName + "On.src");
document .src=imageOn;
}
}
function mouseOff(imgName)
{
if(browserok)
{
imageOff = eval(imgName + "Off.src");
document .src=imageOff;
}
}
// -->
</script>
And the code on the IMG tags...
<img src="../images/button-getabag-off.gif" width="223" height="39" id="getabag" name="getabag" onmouseover="mouseOn('getabag'); return true;" onmouseout="mouseOff('getabag')" />
If you look at the source on my page, you'll see how to use this with more that one image. (I also add a little script that flashes my images on pageload as a hint to users that the images do something.)0 -
Brian Mucha:
Probably the easiest solution would be to do a regular javascript image swap. Just make the two images be 'regular size' (with some extra border) and 'large size' - but actually make both the same dimensions. (Which is 223x39 pixels in my example link.)
Here's a link to my site that is using a nice JS image swap script.
http://www.heroesforlife.org/changemakers_2010_home
The key parts are this script...
<script language="JavaScript" type="text/javascript">
<!--//
browserok = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3)) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion)>=3)));
if(browserok)
{
getabagOn = new Image(223, 39);
getabagOn.src="../_wrappers/changemakers/2010/button-getabag-on.gif";
getabagOff = new Image(223, 39);
getabagOff.src="../_wrappers/changemakers/2010/button-getabag-off.gif";
}
function mouseOn(imgName)
{
if(browserok)
{
imageOn = eval(imgName + "On.src");
document .src=imageOn;
}
}
function mouseOff(imgName)
{
if(browserok)
{
imageOff = eval(imgName + "Off.src");
document .src=imageOff;
}
}
// -->
</script>
And the code on the IMG tags...
<img src="../images/button-getabag-off.gif" width="223" height="39" id="getabag" name="getabag" onmouseover="mouseOn('getabag'); return true;" onmouseout="mouseOff('getabag')" />
If you look at the source on my page, you'll see how to use this with more that one image. (I also add a little script that flashes my images on pageload as a hint to users that the images do something.)Thank you so much for your reply, Brian. As somebody with very limited experience in Javascript, I need input on how to go about doing this. Because this is more advanced, we're considering doing the window-popup thing instead. However, I think the image mouseover looks way cooler
0 -
Adria Pazour:
Thank you so much for your reply, Brian. As somebody with very limited experience in Javascript, I need input on how to go about doing this. Because this is more advanced, we're considering doing the window-popup thing instead. However, I think the image mouseover looks way cooler
If you change your mind feel free to contact me. Its easier than it looks.
B
0 -
Brian Mucha:
If you change your mind feel free to contact me. Its easier than it looks.
B
Yes, I would love and appreciate your help on this! I like hearing "easier than it looks".
0 -
Brian Mucha:
If you change your mind feel free to contact me. Its easier than it looks.
B
Brian,
Kudos to you, always so helpful!!
I was trying to explain this to Tessa at work. Can't she just upload two sizes of image, the one she is displaying in story builder and a larger one. Then link the one in the story (smaller one) to a popup window to the larger image - wouldn't it all be in the url string, not java script?
I seem to recall seeing this and learning it awhile back, but I've never done this and I am not exactly sure how to do it.
I've never done mouseover either, just once for practice in a class.
Thanks again for always being so helpful!
Nikki
0 -
Nikki Valentine Odens:
Brian,
Kudos to you, always so helpful!!
I was trying to explain this to Tessa at work. Can't she just upload two sizes of image, the one she is displaying in story builder and a larger one. Then link the one in the story (smaller one) to a popup window to the larger image - wouldn't it all be in the url string, not java script?
I seem to recall seeing this and learning it awhile back, but I've never done this and I am not exactly sure how to do it.
I've never done mouseover either, just once for practice in a class.
Thanks again for always being so helpful!
Nikki
>
0 -
Brian Mucha:
>
Sorry pop up window is what I've always thought it was called , when a new browser window opens up w/o any tool bars or search bar, just a window with image. I've only seen them done with images. Of course now I can't think of an example of when I've seen this.
0 -
Nikki Valentine Odens:
Sorry pop up window is what I've always thought it was called , when a new browser window opens up w/o any tool bars or search bar, just a window with image. I've only seen them done with images. Of course now I can't think of an example of when I've seen this.
Ahhh, now I see. You want kind of a thumbnail that shows a much bigger full size image somewhere else. (For some reason I took mouseover to mean you wanted the image to get a bit bigger IN PLACE when you passed over it.)
If you are really doing a pop-up I wouldn't do that on mouseover, but onCLICK. There's a bazillion javascripts around to do pop-ups like that. Here's the one I've used.
<script type='text/javascript'>
function PopDialog(URLString, winWidth, winHeight){
var windowProperties = '';
windowProperties = windowProperties + 'fullscreen=no,';
windowProperties = windowProperties + 'toolbar=no,';
windowProperties = windowProperties + 'location=no,';
windowProperties = windowProperties + 'directories=no,';
windowProperties = windowProperties + 'status=no,';
windowProperties = windowProperties + 'menubar=no,';
windowProperties = windowProperties + 'scrollbars=no,';
windowProperties = windowProperties + 'resizable=yes,';
windowProperties = windowProperties + 'top=50,';
windowProperties = windowProperties + 'left=100,';
windowProperties = windowProperties + 'width=' + winWidth + ',';
windowProperties = windowProperties + 'height=' + winHeight;
var win = window.open(URLString, '', windowProperties);
}
</script>Call it like this...
<a href="images/myBigImage.jpg" onClick="PopDialog('images/myBigImage.jpg', 600, 800); return false;"><img scr="myThumbnail.gif" /></a>0 -
Brian Mucha:
Ahhh, now I see. You want kind of a thumbnail that shows a much bigger full size image somewhere else. (For some reason I took mouseover to mean you wanted the image to get a bit bigger IN PLACE when you passed over it.)
If you are really doing a pop-up I wouldn't do that on mouseover, but onCLICK. There's a bazillion javascripts around to do pop-ups like that. Here's the one I've used.
<script type='text/javascript'>
function PopDialog(URLString, winWidth, winHeight){
var windowProperties = '';
windowProperties = windowProperties + 'fullscreen=no,';
windowProperties = windowProperties + 'toolbar=no,';
windowProperties = windowProperties + 'location=no,';
windowProperties = windowProperties + 'directories=no,';
windowProperties = windowProperties + 'status=no,';
windowProperties = windowProperties + 'menubar=no,';
windowProperties = windowProperties + 'scrollbars=no,';
windowProperties = windowProperties + 'resizable=yes,';
windowProperties = windowProperties + 'top=50,';
windowProperties = windowProperties + 'left=100,';
windowProperties = windowProperties + 'width=' + winWidth + ',';
windowProperties = windowProperties + 'height=' + winHeight;
var win = window.open(URLString, '', windowProperties);
}
</script>Call it like this...
<a href="images/myBigImage.jpg" onClick="PopDialog('images/myBigImage.jpg', 600, 800); return false;"><img scr="myThumbnail.gif" /></a>
" (For some reason I took mouseover to mean you wanted the image to get a bit bigger IN PLACE when you passed over it.)"
Just to clarify, that is what I wanted when I began this discussion. However, Nikki is saying the window pop-up thing is much simpler.
Sorry for the confusion!0 -
Adria Pazour:
" (For some reason I took mouseover to mean you wanted the image to get a bit bigger IN PLACE when you passed over it.)"
Just to clarify, that is what I wanted when I began this discussion. However, Nikki is saying the window pop-up thing is much simpler.
Sorry for the confusion!No worries, prolly my fault. Never assume!
The pop-up is much simplier.
You could also make the big version just appear on the page when the thumbnail is moused-over, but it would get a bit more complex.
B
0 -
Brian Mucha:
No worries, prolly my fault. Never assume!
The pop-up is much simplier.
You could also make the big version just appear on the page when the thumbnail is moused-over, but it would get a bit more complex.
B
Are you trying to do something like this?
http://cssglobe.com/lab/tooltip/02/
If so, here are the instructions on how to do it using jQuery:
http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
0 -
Noah Cooper:
Are you trying to do something like this?
http://cssglobe.com/lab/tooltip/02/
If so, here are the instructions on how to do it using jQuery:
http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
Noah - YES! Thank you! I will look into what you gave me and update -
0 -
Noah Cooper:
Are you trying to do something like this?
http://cssglobe.com/lab/tooltip/02/
If so, here are the instructions on how to do it using jQuery:
http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
Hah, that is too nice.
I have a script around somewhere to do nothing but that exact tooltip thing that must be 400 lines long.
B
0 -
Noah Cooper:
Are you trying to do something like this?
http://cssglobe.com/lab/tooltip/02/
If so, here are the instructions on how to do it using jQuery:
http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
Please see attached. Thank you so much!
Message was edited by: Tessa
0 -
Noah Cooper:
Are you trying to do something like this?
http://cssglobe.com/lab/tooltip/02/
If so, here are the instructions on how to do it using jQuery:
http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
Noah,
Jen and I tried this using the jquery article we used it didn't work. Do we need to declare this somehwere? Since this is a pagebuilder page using HTML?
<div class="campusHighlights"><a title="Preserve Lakota culture for the children"
<strong>
<a href="http://www.stjo.org/images/content/pagebuilder/14825.jpg" class="preview">
<img src="http://www.stjo.org/images/content/pagebuilder/14837.jpg" alt="gallery thumbnail"/></a>
</strong></a><strong>Preserve Lakota culture for the children</strong><br />Provide boys and girls at St. Joseph’s with the powwow regalia they need to continue this important tradition! <a title="Preserve Lakota culture for the children"<a href="http://www.stjo.org/help_cpf_b" target="_self">Support our Cultural Preservation Fund</a> <span class="arrowBlue">»</span></div>
</td>
</tr>
Here is how it looks it just pulled the larger image.
Thanks for your help.
0 -
Noah Cooper:
Are you trying to do something like this?
http://cssglobe.com/lab/tooltip/02/
If so, here are the instructions on how to do it using jQuery:
http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
Okay, I tried using the image preview (jQuery tooltip), but have been unsuccessful. Am I missing something?
<tr>
<td><div class="campusHighlights"><a title="Give the gift culture" href="http://www.stjo.org/site/News2?page=NewsArticle&id=6874" target="_self">
<img src="http://www.stjo.org/images/content/pagebuilder/14825.jpg" class="preview" img src="http://www.stjo.org/images/content/pagebuilder/14837.jpg" border="0"/></a>
<strong>Give the gift culture</strong><br />
Cultural education provides the youngsters at our school with the tools to preserve their proud culture to learn about their heritage and to build a bright future. As Lakota (Sioux) elders pass on, cultural education becomes more important than ever."
<a title="Give the gift culture" href="News2?page=NewsArticle&id=6874">Watch our video</a> <span class="arrowBlue">»</span> </div>
</td>
</tr>Thanks!
0
Categories
- All Categories
- Shannon parent
- shannon 2
- shannon 1
- 21 Advocacy DC Users Group
- 14 BBCRM PAG Discussions
- 89 High Education Program Advisory Group (HE PAG)
- 28 Luminate CRM DC Users Group
- 8 DC Luminate CRM Users Group
- Luminate PAG
- 5.9K Blackbaud Altru®
- 58 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 409 bbcon®
- 2.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- donorCentrics®
- 1.1K Blackbaud eTapestry®
- 2.8K Blackbaud Financial Edge NXT®
- 1.1K Blackbaud Grantmaking™
- 527 Education Management Solutions for Higher Education
- 1 JustGiving® from Blackbaud®
- 4.6K Education Management Solutions for K-12 Schools
- Blackbaud Luminate Online & Blackbaud TeamRaiser
- 16.4K Blackbaud Raiser's Edge NXT®
- 4.1K SKY Developer
- 547 ResearchPoint™
- 151 Blackbaud Tuition Management™
- 61 everydayhero
- 3 Campaign Ideas
- 58 General Discussion
- 115 Blackbaud ID
- 87 K-12 Blackbaud ID
- 6 Admin Console
- 949 Organizational Best Practices
- 353 The Tap (Just for Fun)
- 235 Blackbaud Community Feedback Forum
- 55 Admissions Event Management EAP
- 18 MobilePay Terminal + BBID Canada EAP
- 36 EAP for New Email Campaigns Experience in Blackbaud Luminate Online®
- 109 EAP for 360 Student Profile in Blackbaud Student Information System
- 41 EAP for Assessment Builder in Blackbaud Learning Management System™
- 9 Technical Preview for SKY API for Blackbaud CRM™ and Blackbaud Altru®
- 55 Community Advisory Group
- 46 Blackbaud Community Ideas
- 26 Blackbaud Community Challenges
- 7 Security Testing Forum
- 3 Blackbaud Staff Discussions
- 1 Blackbaud Partners Discussions
- 1 Blackbaud Giving Search™
- 35 EAP Student Assignment Details and Assignment Center
- 39 EAP Core - Roles and Tasks
- 59 Blackbaud Community All-Stars Discussions
- 20 Blackbaud Raiser's Edge NXT® Online Giving EAP
- Diocesan Blackbaud Raiser’s Edge NXT® User’s Group
- 2 Blackbaud Consultant’s Community
- 43 End of Term Grade Entry EAP
- 92 EAP for Query in Blackbaud Raiser's Edge NXT®
- 38 Standard Reports for Blackbaud Raiser's Edge NXT® EAP
- 12 Payments Assistant for Blackbaud Financial Edge NXT® EAP
- 6 Ask an All Star (Austen Brown)
- 8 Ask an All-Star Alex Wong (Blackbaud Raiser's Edge NXT®)
- 1 Ask an All-Star Alex Wong (Blackbaud Financial Edge NXT®)
- 6 Ask an All-Star (Christine Robertson)
- 21 Ask an Expert (Anthony Gallo)
- Blackbaud Francophone Group
- 22 Ask an Expert (David Springer)
- 4 Raiser's Edge NXT PowerUp Challenge #1 (Query)
- 6 Ask an All-Star Sunshine Reinken Watson and Carlene Johnson
- 4 Raiser's Edge NXT PowerUp Challenge: Events
- 14 Ask an All-Star (Elizabeth Johnson)
- 7 Ask an Expert (Stephen Churchill)
- 2025 ARCHIVED FORUM POSTS
- 322 ARCHIVED | Financial Edge® Tips and Tricks
- 164 ARCHIVED | Raiser's Edge® Blog
- 300 ARCHIVED | Raiser's Edge® Blog
- 441 ARCHIVED | Blackbaud Altru® Tips and Tricks
- 66 ARCHIVED | Blackbaud NetCommunity™ Blog
- 211 ARCHIVED | Blackbaud Target Analytics® Tips and Tricks
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- Luminate CRM DC Users Group
- 225 ARCHIVED | Blackbaud eTapestry® Tips and Tricks
- 1 Blackbaud eTapestry® Know How Blog
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)
- 1 Blackbaud K-12 Education Solutions™ Blog
- 280 ARCHIVED | Mixed Community Announcements
- 3 ARCHIVED | Blackbaud Corporations™ & Blackbaud Foundations™ Hosting Status
- 1 npEngage
- 24 ARCHIVED | K-12 Announcements
- 15 ARCHIVED | FIMS Host*Net Hosting Status
- 23 ARCHIVED | Blackbaud Outcomes & Online Applications (IGAM) Hosting Status
- 22 ARCHIVED | Blackbaud DonorCentral Hosting Status
- 14 ARCHIVED | Blackbaud Grantmaking™ UK Hosting Status
- 117 ARCHIVED | Blackbaud CRM™ and Blackbaud Internet Solutions™ Announcements
- 50 Blackbaud NetCommunity™ Blog
- 169 ARCHIVED | Blackbaud Grantmaking™ Tips and Tricks
- Advocacy DC Users Group
- 718 Community News
- Blackbaud Altru® Hosting Status
- 104 ARCHIVED | Member Spotlight
- 145 ARCHIVED | Hosting Blog
- 149 JustGiving® from Blackbaud® Blog
- 97 ARCHIVED | bbcon® Blogs
- 19 ARCHIVED | Blackbaud Luminate CRM™ Announcements
- 161 Luminate Advocacy News
- 187 Organizational Best Practices Blog
- 67 everydayhero Blog
- 52 Blackbaud SKY® Reporting Announcements
- 17 ARCHIVED | Blackbaud SKY® Reporting for K-12 Announcements
- 3 Luminate Online Product Advisory Group (LO PAG)
- 81 ARCHIVED | JustGiving® from Blackbaud® Tips and Tricks
- 1 ARCHIVED | K-12 Conference Blog
- Blackbaud Church Management™ Announcements
- ARCHIVED | Blackbaud Award Management™ and Blackbaud Stewardship Management™ Announcements
- 1 Blackbaud Peer-to-Peer Fundraising™, Powered by JustGiving® Blogs
- 39 Tips, Tricks, and Timesavers!
- 56 Blackbaud Church Management™ Resources
- 154 Blackbaud Church Management™ Announcements
- 1 ARCHIVED | Blackbaud Church Management™ Tips and Tricks
- 11 ARCHIVED | Blackbaud Higher Education Solutions™ Announcements
- 7 ARCHIVED | Blackbaud Guided Fundraising™ Blog
- 2 Blackbaud Fundraiser Performance Management™ Blog
- 9 Foundations Events and Content
- 14 ARCHIVED | Blog Posts
- 2 ARCHIVED | Blackbaud FIMS™ Announcement and Tips
- 59 Blackbaud Partner Announcements
- 10 ARCHIVED | Blackbaud Impact Edge™ EAP Blogs
- 1 Community Help Blogs
- Diocesan Blackbaud Raiser’s Edge NXT® Users' Group
- Blackbaud Consultant’s Community
- Blackbaud Francophone Group
- 1 BLOG ARCHIVE CATEGORY
- Blackbaud Community™ Discussions
- 8.3K Blackbaud Luminate Online® & Blackbaud TeamRaiser® Discussions
- 5.7K Jobs Board