⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Wt
All Projects
Wt
Overview
Activity
Roadmap
Issues
Wiki
Forums
Download (916 Bytes)
Bug #2167
» divtest.html
bring-to-front example with div's -
Roman Puls
, 08/30/2013 09:34 AM
<html>
<head>
<script
src=
"jquery.js"
type=
"text/javascript"
></script>
<script
type=
"text/javascript"
>
function
totop
(
id
)
{
$
(
id
).
parent
().
append
(
$
(
id
));
$
(
id
).
append
(
"
<small>clicked, and moved to front</small>
"
);
}
</script>
<style
type=
"text/css"
>
#a
{
left
:
0px
;
top
:
0px
;
background-color
:
red
;
width
:
100px
;
height
:
100px
;
position
:
absolute
;
overflow
:
auto
;
}
#b
{
left
:
50px
;
top
:
50px
;
background-color
:
blue
;
width
:
100px
;
height
:
100px
;
position
:
absolute
;
overflow
:
auto
;
}
#c
{
left
:
100px
;
top
:
100px
;
background-color
:
green
;
width
:
100px
;
height
:
100px
;
position
:
absolute
;
overflow
:
auto
;
}
</style>
</head>
<body>
<div
id=
"a"
>
</div>
<div
id=
"b"
>
</div>
<div
id=
"c"
>
</div>
<script
type=
"text/javascript"
>
$
(
"
div
"
).
click
(
function
()
{
totop
(
$
(
this
));
});
</script>
</body>
</html>
« Previous
1
2
Next »
(1-1/2)
Loading...