Advertisement

06.17.2008 at 09:08AM PDT, ID: 23492077
[x]
Attachment Details

Selecting two DIV's to switch places w/ animation

Asked by chuckbeats in JavaScript, Miscellaneous Programming, Asynchronous Javascript and XML (AJAX)

Tags: Javascript DHTML AJAX

I know that its a confusing question but this is what i nedd.  I have a column of 10 "divs". Each has a small 75X75 picture.  I need to find an example or tutorial on how i can select "2" of the images and have them switch, almost like a memory game look.  I need them to animates from one to the other(not real important).

ex.

select div1
then
select div4
as soon as div 4 is selected the divs switch with each other.

thanks, i can give more info if needed, and i will attach my code justincase u need it.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
* {
margin:0px;
padding:0px;
}
 
body {
background-color:#f2f2f2;
}
 
#pictrueContainer {
width:300px;
text-align:center;
margin:10px;
border:1px solid #666666;
background-color:#FFFFFF;
padding-bottom:3px;
}
 
.pictureEven {
height:75px;
width:295px;
background-color:#CCCCCC;
border:1px solid #000000;
margin-top:3px;
text-align:left;
}
 
.pictureEven a img {
height:75px;
width:75px;
background-color:#CCCCCC;
border-right:1px solid #000000;
border-bottom:0px;
border-left:0px;
border-top:0px;
}
 
.pictureEven a:hover img {
filter:alpha(opacity=50);
-moz-opacity:.50;
opacity:.50;
}
 
.pictureOdd {
height:75px;
width:295px;
background-color:#CCCCCC;
border:1px solid #000000;
margin-top:3px;
text-align:left;
}
 
.pictureOdd a img {
height:75px;
width:75px;
background-color:#CCCCCC;
border-right:1px solid #000000;
border-bottom:0px;
border-left:0px;
border-top:0px;
}
 
.pictureOdd a:hover img {
filter:alpha(opacity=50);
-moz-opacity:.50;
opacity:.50;
}
 
.link_style {
position:relative;
vertical-align:top;
left:60px;
top:27px;
font-family:"Courier New", Courier, monospace;
font-size:12px;
color:#333333;
}
 
</style>
 
 
 
</head>
 
<body>
<div id="pictrueContainer">
<div class="pictureOdd"  id="one"><a href="#" > <img src="picUpload/pic1.jpg" alt="1" /></a> <a href="#" class="link_style">Listing_11.jpg</a> </div>
<div class="pictureEven"><a href="#"><img src="picUpload/pic2.jpg" alt="2" /></a> <a href="#" class="link_style">Listing_21.jpg</a> </div>
<div class="pictureOdd"><a href="#"><img src="picUpload/pic3.jpg" alt="3" /></a> <a href="#" class="link_style">Listing_22.jpg</a></div>
<div class="pictureEven"><a href="#"><img src="picUpload/pic4.jpg" alt="4" /></a> <a href="#" class="link_style">Listing_23.jpg</a></div>
<div class="pictureOdd"><a href="#"><img src="picUpload/pic5.jpg" alt="5" /></a> <a href="#" class="link_style">Listing_24.jpg</a></div>
<div class="pictureEven"><a href="#"><img src="picUpload/pic6.jpg" alt="6"/></a> <a href="#" class="link_style">Listing_25.jpg</a></div>
<div class="pictureOdd"><a href="#"><img src="picUpload/pic7.jpg" alt="7" /></a> <a href="#" class="link_style">Listing_26.jpg</a></div>
<div class="pictureEven"><a href="#"><img src="picUpload/pic8.jpg" alt="8" /></a> <a href="#" class="link_style">Listing_27.jpg</a></div>
<div class="pictureOdd"><a href="#"><img src="picUpload/pic9.jpg" alt="9" /></a> <a href="#" class="link_style">Listing_28.jpg</a></div>
<div class="pictureEven"><a href="#"><img src="picUpload/pic10.jpg" alt="10" /></a> <a href="#" class="link_style">Listing_29.jpg</a></div>
 
 
</div>
<img src="picUpload/pic11.jpg" />
</body>
</html>
 
Loading Advertisement...
 
[+][-]06.17.2008 at 09:33AM PDT, ID: 21804846

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 09:46AM PDT, ID: 21805016

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.17.2008 at 10:16AM PDT, ID: 21805312

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript, Miscellaneous Programming, Asynchronous Javascript and XML (AJAX)
Tags: Javascript DHTML AJAX
Sign Up Now!
Solution Provided By: rowejd
Participating Experts: 1
Solution Grade: A
 
 
[+][-]06.17.2008 at 10:27AM PDT, ID: 21805421

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628