Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-18-2012, 09:42 PM   PM User | #1
samslystone
New Coder

 
Join Date: Dec 2011
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
samslystone is an unknown quantity at this point
Dragging images from a gallery - javascript

Hi All

My client would like the user to be able to drag each image from this gallery directly onto the desktop. Currently if one grabs any particular image it always only saves the last (08), due to the javascript. Is there any way around this? Ideally she would like to be able to drag any of the images.
http://catherinehyland.co.uk/2012/work/work.html

All the best

S
samslystone is offline   Reply With Quote
Old 12-18-2012, 10:13 PM   PM User | #2
StevenHu
Regular Coder

 
Join Date: Jun 2011
Location: CA
Posts: 105
Thanks: 0
Thanked 10 Times in 10 Posts
StevenHu is an unknown quantity at this point
I was able to drag that page's picture onto my desktop in my Mac OS X Lion.
__________________
Steve Husting
http://iphonedevlog.wordpress.com
StevenHu is offline   Reply With Quote
Old 12-19-2012, 09:02 AM   PM User | #3
samslystone
New Coder

 
Join Date: Dec 2011
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
samslystone is an unknown quantity at this point
Hi Steve,

I can drag one picture, but not any of the others. If you flick through the gallery and try dragging each picture it will drag the same one picture each time

S
samslystone is offline   Reply With Quote
Old 12-20-2012, 03:23 PM   PM User | #4
hdewantara
Regular Coder

 
hdewantara's Avatar
 
Join Date: Aug 2009
Location: Jakarta, Indonesia.
Posts: 287
Thanks: 4
Thanked 39 Times in 39 Posts
hdewantara is an unknown quantity at this point
That I think because the image stacking-order doesn't get changed,
whenever one clicks a different number. Image #8 (though transparent)
always stays on the topmost layer and will always get saved.

So maybe you should play with "z-index" order, instead of "opacity":
Code:
#cf7 img {
	position: absolute;
	margin-right: auto;
	margin-left: auto;
	left: 0;
	z-index: 0;
	/*opacity: 0;*/
	/*-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";*/
	/*filter: alpha(opacity=0);*/
	width: 100%;
}
And the one that gets on the top should have this styling:
Code:
#cf7 img.opaque {
	z-index: 1; /* any numbers larger that previous z-index above */
	/*opacity:1;*/
	/*-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)";*/
	/*filter: alpha(opacity=1);*/
}
hdewantara is offline   Reply With Quote
Users who have thanked hdewantara for this post:
samslystone (12-21-2012)
Old 12-21-2012, 10:05 AM   PM User | #5
samslystone
New Coder

 
Join Date: Dec 2011
Posts: 15
Thanks: 2
Thanked 0 Times in 0 Posts
samslystone is an unknown quantity at this point
Thank you so much, that works perfectly!
samslystone is offline   Reply With Quote
Reply

Bookmarks

Tags
saving images

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:04 PM.


Advertisement
Log in to turn off these ads.