Javascript not working in Chrome/Firefox but ok in Safari - javascript

I'm working on a image overlay section in my website. Three images are in elements which are stacked and revealed one at a time by resizing the elements horizontally using the scrollbar position. It works perfectly in Safari but not in Chrome/Firefox.
I have run the code through the w3c validator and fixed all issues but I still have the same problem...works in safari but not in Chrome/Firefox.
I would really appreciate it if someone could take a look at the code for me below.
Thanks in advance,
Chris
var xyz;
var slide1Width = $("#slide1").width();
var slide2Width = $("#slide2").width();
var slide3Width = $("#slide3").width();
var counter = 0;
$(document).ready(function(e) {
/////////Slide scroll-resize activation/////////
$(window).scroll(function(e) {
var slide1Height = $("#slide1").height();
xyz = $("body").scrollTop();
$("#inputs").text(xyz);
//When slide1 scroll-resize is enabled
if (xyz <= slide1Width && xyz >= 50) {
$("#slide2").css({
"width": xyz
});
};
//When slide2 scroll-resize is enabled
if (xyz >= slide1Width * 2 + 25 && xyz <= slide1Width * 3) {
$("#slide3").css({
"width": xyz - slide1Width * 2
});
};
var video = document.getElementById("video");
video.currentTime = (xyz - slide1Width) / 55;
if (xyz >= slide1Width && xyz < slide1Width * 2) {
$("#video").css({
"visibility": "visible"
});
} else {
$("#video").css({
"visibility": "hidden"
});
};
$("#video").height($("#slide1").height());
/*$("#video").width($("#slide1").width());*/
});
});
window.onload = function(e) {
var x = $("#slide1").width();
var y = $("#slide1").innerHeight();
$("#slide2").resizable({
containment: "parent",
minWidth: 50,
stop: function(event, ui) {
$("body").scrollTop($(this).width());
}
});
$("#slide2").css({
"height": y,
"width": 50
});
$("#slide3").resizable({
containment: "parent",
minWidth: 25,
stop: function(event, ui) {
$("body").scrollTop($(this).width() + x);
}
});
$("#slide3").css({
"height": y,
"width": 25
});
///////////Slide 3 click behaviour////////////
//Single click//
$("#slide3").click(function(e) {
$("body").scrollTop($("#slide1").width() * 2 + $(this).width());
});
//Double click//
$("#slide3").dblclick(function(e) {
$("body").scrollTop($("#slide2").width());
});
///////////Slide 2 click behaviour////////////
//Single click//
$("#slide2").click(function(e) {
$("body").scrollTop($(this).width());
});
};
$(window).resize(function() {
var x = $("#slide1").width();
var y = $("#slide1").innerHeight();
var z = $("#slide2").width();
var slide3width = $("#slide3").width();
var result = z / x;
var b = result * 100;
var c = b.toString() + "%";
var result3 = slide3width / x;
var slide3percentInt = result3 * 100;
var slide3percentString = slide3percentInt.toString() + "%";
$("#slide2").css({
"height": y,
"width": c
});
$("#slide2").resizable({
minWidth: 50,
containment: "parent"
});
$("#slide3").css({
"height": y,
"width": slide3percentString
});
$("#slide3").resizable({
minWidth: 25,
containment: "parent"
});
});
body {
background-color: black;
height: 5000px;
}
#box1 {
width: 100%;
height: 100px;
background-color: black;
}
#wrapper {
position: fixed;
width: 80%;
height: auto;
margin: auto;
left: 10%;
}
img {
width: 100%;
height: auto;
z-index: 1;
}
#slide1 {
position: absolute;
float: left;
width: 100%;
height: auto;
padding: 0;
margin: 0;
border: none;
z-index: 1;
}
#slide2 {
position: absolute;
float: left;
padding: 0;
margin: 0;
border: none;
background-image: url("WESetBW.svg");
background-repeat: no-repeat;
background-size: cover;
z-index: 2;
}
#slide3 {
position: absolute;
padding: 0;
margin: 0;
border: none;
background-image: url("WESetViz.svg");
background-repeat: no-repeat;
background-size: cover;
z-index: 4;
}
#video {
position: relative;
float: left;
margin: 0;
border: none;
z-index: 3;
visibility: hidden;
width: 100%;
object-fit: cover;
}
#inputs {
height: 20px;
width: 100px;
background-color: white;
color: red;
position: fixed;
}
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
<title>Untitled Document</title>
</head>
<body>
<div id="wrapper">
<div id="box1">
</div>
<div id="slide1">
<img src="WESet-photo.svg" alt="World's End set" />
</div>
<div id="slide2">
</div>
<div id="slide3">
</div>
<video id="video">
<source src="WEsetOriginalVideo.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>
</div>
<div id="inputs">
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</body>
</html>

Related

Stop Overlapping while dragging divs

My requirement is to have multiple divs with resizable and draggable property. I can resize any of them and can place at any position. I am able to resize them and can drag them but they get overlapped.
Try the solution of this question but I don't understand how to get the list of elements to go through it. how to restrict drag elements to overlap in interact.js
I'm using the library interact.js
window.dragMoveListener = dragMoveListener;
interact('.signer-box')
.draggable({
onmove: dragMoveListener,
inertia: true,
autoScroll: true,
restrict: {
elementRect: {top: 0, left: 0, bottom: 1, right: 1}
}
})
.resizable({
onmove: resizeMoveListener,
inertia: true,
edges: {left: true, right: true, bottom: true, top: true}
})
function dragMoveListener(event) {
var target = event.target;
var x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx;
var y = (parseFloat(target.getAttribute('data-y')) || 0) + event.dy;
target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px, ' + y + 'px)';
target.setAttribute('data-x', x);
target.setAttribute('data-y', y);
computeSignerBoxPosition();
}
function resizeMoveListener(event) {
var target = event.target;
var x = (parseFloat(target.getAttribute('data-x')) || 0);
var y = (parseFloat(target.getAttribute('data-y')) || 0);
x += event.deltaRect.left;
y += event.deltaRect.top;
target.style.width = event.rect.width + 'px';
target.style.height = event.rect.height + 'px';
target.style.webkitTransform = target.style.transform = 'translate(' + x + 'px,' + y + 'px)';
target.setAttribute('data-x', x);
target.setAttribute('data-y', y);
computeSignerBoxPosition();
}
function computeSignerBoxPosition() {
var $signatureBox = $('.signer-box');
var sbDataX = parseFloat($signatureBox.attr('data-x'));
var sbDataY = parseFloat($signatureBox.attr('data-y'));
var sbOuterWidth = $signatureBox.outerWidth();
var sbOuterHeight = $signatureBox.outerHeight();
var w = $('#pdf-page').width();
var h = $('#pdf-page').height();
var top = sbDataX / w;
var left = sbDataY / h;
var width = sbOuterWidth / w;
var height = sbOuterHeight / h;
document.getElementById("widthValue").value = width;
document.getElementById("heightValue").value = height;
document.getElementById("coorX").value = top;
document.getElementById("coorY").value = left;
}
#charset "UTF-8";
#content{
text-align: center;
}
#pdf-container {
display: inline-block;
width: 100%;
user-select: none;
}
#pdf-page {
width: 100%;
}
.signer-box {
background: url('../images/pen_icon.png') #29e no-repeat 50% 50%;
background-size: 50%;
color: white;
font-size: 20px;
font-family: sans-serif;
border-radius: 8px;
width: 180px;
height: 150px;
position:absolute;
opacity: .8;
box-sizing: border-box;
box-shadow: rgb(0, 0, 0, 0.7) 0.2em 0.2em 0.5em;
-ms-touch-action: none;
touch-action: none;
}
#signature-pad {
position: relative;
width: 100%;
height: 160px;
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
user-select: none;
}
#signatureImg{
width: 100%;
}
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<div id="content">
<div class="wrap">
<hr style="border:15px;"><hr style="border:2px;">
<div id="wrapper">
<div id="content">
<div id="pdf-container" >
<div id="signers-list">
<div id="signers-list">
<div id="signer-1" class="signer-box" data-x="379" data-y="279" style="position: absolute; transform: translate(379px, 279px); width: 148px; height: 90px; --content:"Firma número 1" ;"></div>
<div id="signer-2" class="signer-box" data-x="17" data-y="30" style="position: absolute; transform: translate(17px, 30px); width: 238px; height: 121px; --content:"Firma número 2" ;"></div></div>
</div>
<img id="pdf-page" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABMgAAAYwCAIAAAAI8uQFAAAzRklEQVR42uzdf2SV/f/A8Q8zySQxyUwykiTJSJLMjMncMhkzkyQxk1uSSJIkMZN8JJEkk0RmJkkkmUziNpNMYjLJJCZJMn1fevu+XZ+zH/dpq+67ejz+yDnv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LEEAADAWAIAAGAsAQAAMJYAAABgLAEAADCWAAAAGEsAAACMJQAAABhLAAAAjCUAAADGEgAAAGMJAAAAxhIAAABjCQAAgLEEAADAWAIAAICxBAAAwFgCAABgLAEAADCWAAAAYCwBAAAwlgAAABhLAAAAjCUAAADGEgAAAIwlAAAAxhIAAABjCQAAgLEEAAAAYwkAAICxBAAAwFgCAABgLAEAAMBYAgAAYCwBAAAwlgAAABhLAAAAMJYAAAAYSwAAAIwlAAAAxhIAAABjCQAAAMYSAAAAYwkAAICxBAAAwFgCAACAsQQAAMBYAgAAYCwBAAAwlgAAAGAsAQAAMJYAAAAYSwAAAIwlAAAAGEsAAACMJQAAAMYSAAAAYwkAAICxBAAAAGMJAACAsQQAAMBYAgAAYCwBAADAWAIAAGAsAQAAMJYAAAAYSwAAADCWAAAAGEsAAACMJQAAAMYSAAAAjCUAAADGEgAAAGMJAACAsQQAAABjCQAAgLEEAADAWAIAAGAsAQAAMJYAAABgLAEAADCWAAAAGEsAAACMJQAAABhLAAAAjCUAAADGEgAAAGMJAAAAxhIAAABjCQAAgLEEAADAWAIAAICxBAAAwFgCAABgLAEAADCWAAAAGEsAAAAwlgAAABhLAAAAjCUAAADGEgAAAIwlAAAAxhIAAABjCQAAgLEEAAAAYwkAAICxBAAAwFgCAABgLAEAAMBYAgAAYCwBAAAwlgAAABhLAAAAjCUAAAAYSwAAAIwlAAAAxhIAAABjCQAAAMYSAAAAYwkAAICxBAAAwFgCAACAsQQAAMBYAgAAYCwBAAAwlgAAAGAsAQAAMJYAAAAYSwAAAIwlAAAAGEsAAACMJQAAAMYSAAAAYwkAAICxBAAAAGMJAACAsQQAAMBYAgAAsBF9Ip71RRoBHwAAAABJRU5ErkJggg==" />
</div>
</div>
</div>
</table></form>
<hr style="border:15px;"><hr style="border:2px;">
<div class="content">
<table id="customers">
<tr>
<td>
X:
</td>
<td>
<input type="text" name="coorX" id="coorX" value="0" readonly="readonly">
</td>
<td>
h:
</td>
<td>
<input type="text" name="heightValue" id="heightValue" value="150" readonly="readonly">
</td>
</tr>
<tr>
<td>
Y:
</td>
<td>
<input type="text" name="coorY" id="coorY" value="0" readonly="readonly">
</td>
<td>
w:
</td>
<td>
<input type="text" name="widthValue" id="widthValue" value="180" readonly="readonly">
</td>
</tr>
</table>
<hr>
</form>
</div><!-- /.wrap -->
</div><!-- /.content -->
</div>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.5/js/bootstrap.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.943/pdf.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/interact.js/1.2.9/interact.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.0.943/pdf.worker.min.js'></script>
</body>
</html>

Get text under draggable div (jquery)

I have draggable div which dragging above .outerDiv with text content. How can I get text from .outerDiv which got into the borders of draggable div ?
$(".outerDiv .isStore").draggable({ containment: ".outerDiv" }).resizable({ containment: ".outerDiv" });
.isStore
{
width: 20px;
height: 20px;
background-color: red;
}
.outerDiv
{
width: 160px;
height: 160px;
background-color: #ccc;
}
.ui-resizable {
position: absolute !important;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
<div class='outerDiv'><div class='isStore'></div> sdfsdfsd
<br>
first
<br>
second
<br>
third
</div>
Edit: I want code that takes part of the text, under .isStore, from .outerDiv and puts it in .isStore after dragging.
var is_colliding = function( $div1, $div2 ) {
// Div 1 data
var d1_offset = $div1.offset();
var d1_height = $div1.outerHeight( true );
var d1_width = $div1.outerWidth( true );
var d1_distance_from_top = d1_offset.top + d1_height;
var d1_distance_from_left = d1_offset.left + d1_width;
// Div 2 data
var d2_offset = $div2.offset();
var d2_height = $div2.outerHeight( true );
var d2_width = $div2.outerWidth( true );
var d2_distance_from_top = d2_offset.top + d2_height;
var d2_distance_from_left = d2_offset.left + d2_width;
var not_colliding = ( d1_distance_from_top < d2_offset.top || d1_offset.top > d2_distance_from_top || d1_distance_from_left < d2_offset.left || d1_offset.left > d2_distance_from_left );
// Return whether it IS colliding
return ! not_colliding;
};
$(function(){
$(".outerDiv .isStore")
.draggable(
{
containment: ".outerDiv",
drag: function() {
$('.targetElem').each(function(){
$isStore = $('.isStore');
if (is_colliding($isStore , $(this))) {
var elemName = $(this).text();
if ($isStore.text().indexOf(elemName) == -1) {
$isStore.append(elemName+'<br>');
}
}
});
}
}
)
.resizable({ containment: ".outerDiv" });
});
.targetElem {background:yellow;}
.isStore
{
width: 20px;
height: 20px;
background-color: red;
}
.outerDiv
{
width: 160px;
height: 160px;
background-color: #ccc;
}
.ui-resizable {
position: absolute !important;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
<div class='outerDiv'><div class='isStore'></div>
<br>
<br>
<br>
<span class="targetElem">first</span><br>
<br>
<span class="targetElem">second</span><br>
<br>
<span class="targetElem">third</span>
</div>
I used code that detects if two divs are colliding:
http://stackoverflow.com/questions/5419134/how-to-detect-if-two-divs-touch-with-jquery
Here is a silly example;
I just created a draggable div which contain both the text and the isStore box:
$(".outerDiv .content").draggable({ containment: ".outerDiv" });
$(".outerDiv .isStore").resizable({ containment: ".outerDiv" });
.isStore
{
width: 20px;
height: 20px;
background-color: red;
}
.outerDiv
{
width: 160px;
height: 160px;
background-color: #ccc;
}
.ui-resizable {
position: absolute !important;
}
.content {
width: 80px;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
<div class='outerDiv'><div class="content"><div class='isStore'></div> sdfsdfsd
<br>
first
<br>
second
<br>
third
</div></div>
Is this what you mean? (putting the text inside the red draggable/resizable div) Or do you want code that dynamically takes the code from outerDiv and puts it in isStore?
Note I used "overflow:hidden" in the style for isStore so that it doesn't show outside of the div.
$(".outerDiv .isStore").draggable({ containment: ".outerDiv" }).resizable({ containment: ".outerDiv" });
.isStore
{
width: 20px;
height: 20px;
background-color: red;
overflow: hidden;
}
.outerDiv
{
width: 160px;
height: 160px;
background-color: #ccc;
}
.ui-resizable {
position: absolute !important;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/themes/smoothness/jquery-ui.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>
<div class='outerDiv'><div class='isStore'>sdfsdfsd
<br>
first
<br>
second
<br>
third</div>
</div>

Matching game using javascript

I making a game the logic of the game is to match the word given but it uses a image.
How to validate it using image?
< script >
var e = document.getElementById("E");
var n = document.getElementById("N");
var d = document.getElementById("D");
/*move img_letter*/
//E
function move_E() {
e.onclick = function() {
e.style.bottom = "300px"
e.style.left = "320px"
}
};
//N
function move_N() {
n.onclick = function() {
n.style.bottom = "300px"
n.style.left = "550px"
}
};
//D
function move_D() {
d.onclick = function() {
d.style.bottom = "300px"
d.style.left = "780px"
}
};
window.onload = function() {
move_E();
move_N();
move_D();
}
< /script>
<html>
<head>
</head>
<style>
#D {
margin-left: -3%;
position: absolute;
}
#N {
margin-left: 5%;
position: absolute;
}
#E {
margin-left: 13%;
position: absolute;
}
.img_letter {
margin-top: 25%;
margin-left: 40%;
}
</style>
<body>
<h1 align="center">END</h1>
<div class="img_letter">
<div id="N">
<img src="http://i62.tinypic.com/2rx8qjb_th.png" width="100px" height="100px">
</div>
<div id="E">
<img src="http://i61.tinypic.com/2qny5xx_th.png" width="100px" height="100px">
</div>
<div id="D">
<img src="http://i57.tinypic.com/2554dfk_th.png" width="100px" height="100px">
</div>
</div>
</body>
</htmL>

Moving an element using javascript

I've built a small Javascript application which can move an SVG element, i've now tried to rebuild it using image elements for the controls rather than SVG shapes.
Javascript + jQuery
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var panning = false;
var direction;
function startPan(dir){
panning = true;
direction = dir;
}
function stopPan(){
panning = false;
}
function pan(){
var item = $("#moveme");
var x = item.position().left;
var y = item.position().top;
var amount = 1;
if(direction == "left"){
x -= amount;
} else if (direction == "right"){
x += amount ;
} else if (direction == "up"){
y -= amount;
} else if (direction == "down"){
y += amount;
}
item.css("left", x);
item.css("top", y);
}
function panLoop(){
if(panning == true){
pan();
}
}
setInterval(panLoop,100);
});
</script>
<style>
.button:hover{
opacity: 0.5;
}
.button{
position: absolute;
}
.compass{
position: absolute;
}
div.pan{
position: absolute;
width: 90px;
height: 90px;
}
#moveme{
position: absolute;
top: 200px;
left: 200px;
}
</style>
<div class="pan">
<img class="button"
style="top: 0px; left: 30px;"
src="images/tu.png"
onmouseover="startPan('up')"
onmouseout="stopPan()" />
<img class="button"
style="top: 30px; right: 0px;"
src="images/tr.png"
onmouseover="startPan('right')"
onmouseout="stopPan()" />
<img class="button"
style="bottom: 0px; left: 30px;"
src="images/td.png"
onmouseover="startPan('down')"
onmouseout="stopPan()" />
<img class="button"
style="top: 30px; left: 0px;"
src="images/tl.png"
onmouseover="startPan('left')"
onmouseout="stopPan()" />
<img class="compass"
style="top: 21px; left: 21px;"
src="images/c.png"/>
</div>
<div id="moveme">
HELLo
</div>
However it's not calling the mouseover event, and I can't figure out why....
Here is the version using SVG:
Working version using Javascript + SVG
Working version:
Working without SVG
See here http://jsbin.com/ecihij/edit#source
When you write your functions you do not need to put them inside the jQuery document Ready section
Jarred is right you should also be using jQuery event handers see updated example here
http://jsbin.com/ecihij/2/edit.
And code below
HTML
<!DOCTYPE html>
<html>
<head>
<style>
.button:hover{
opacity: 0.5;
}
.button{
position: absolute;
}
.compass{
position: absolute;
}
div.pan{
position: absolute;
width: 90px;
height: 90px;
}
#moveme{
position: absolute;
top: 200px;
left: 200px;
}
</style>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
article, aside, figure, footer, header, hgroup,
menu, nav, section { display: block; }
</style>
</head>
<body>
<div class="pan">
<p class="button bup" style="top: 0px; left: 30px;" > up</p>
<p class="button bright" syle="top: 30px; right: 0px;" >right </p>
<p class="button bdown" style="bottom: 0px; left: 30px;">down </p>
<p class="button bleft" style="top: 30px; left: 0px;" >left </p>
<p class="compass" style="top: 21px; left: 21px;">compass </p>
</div>
<div id="moveme">
HELLo
</div>
</body>
</html>
JAVASCRIPT
var panning = false;
var direction;
function startPan(dir){
panning = true;
direction = dir;
}
function stopPan(){
panning = false;
}
function pan(){
var item = $("#moveme");
var x = item.position().left;
var y = item.position().top;
var amount = 1;
if(direction == "left"){
x -= amount;
} else if (direction == "right"){
x += amount ;
} else if (direction == "up"){
y -= amount;
} else if (direction == "down"){
y += amount;
}
item.css("left", x);
item.css("top", y);
}
function panLoop(){
if(panning === true){
pan();
}
}
setInterval(panLoop,100);
$(document).ready(function(){
$('.bup').mouseover(function(){ startPan('up'); }).mouseout(stopPan);
$('.bright').mouseover(function(){ startPan('right'); }).mouseout(stopPan);
$('.bleft').mouseover(function(){ startPan('left'); }).mouseout(stopPan);
$('.bdown').mouseover(function(){ startPan('down'); }).mouseout(stopPan);
});

Expand and overlap image over a grid of other images

I've been fighting with jQuery all night and getting quite frustrated here, so forgive me if the answer was staring me in the face.
I have a 5x3 grid of 15 images contained within a <div>, and when I click on one of them, I want it to expand to three times its original size of 150x105 and overlap the rest. I've got the expanding down, but the overlapping isn't quite working.
My current HTML:
<div id="image-grid">
<img src="images/after-pictures/1.jpg" class="igc1" />
<img src="images/after-pictures/2.jpg" class="igc2" />
<img src="images/after-pictures/3.jpg" class="igc3" />
<img src="images/after-pictures/4.jpg" class="igc4" />
<img src="images/after-pictures/5.jpg" class="igc5" />
<img src="images/after-pictures/6.jpg" class="igc1" />
<img src="images/after-pictures/7.jpg" class="igc2" />
<img src="images/after-pictures/8.jpg" class="igc3" />
<img src="images/after-pictures/9.jpg" class="igc4" />
<img src="images/after-pictures/10.jpg" class="igc5" />
<img src="images/after-pictures/11.jpg" class="igc1" />
<img src="images/after-pictures/12.jpg" class="igc2" />
<img src="images/after-pictures/13.jpg" class="igc3" />
<img src="images/after-pictures/14.jpg" class="igc4" />
<img src="images/after-pictures/15.jpg" class="igc5" />
</div>
The igc* class denotes the column the image is in.
CSS:
#image-grid {
border: 1px solid #aaa;
width: 745px;
padding: 5px 2px 2px 5px;
}
#image-grid img {
width: 150px;
height: 105px;
margin: -2px;
}
jQuery:
$('#image-grid img').click(function() {
$(this).animate({
width: '450px',
height: '315px',
zIndex: '10'
}, 200);
});
somewhat like this...
$('#image-grid img').click(function () {
$(this).animate({
width: '450px',
height: '315px'
}, 200)
.css({
'z-index': function (i, z) {
return z + 10;
}, position: 'absolute',
left: 0,
top: 0
})
.siblings().css({
'z-index': function (i, z) {
return z - 10;
}, position: 'static',
width: '150px',
height: '105px',
left: 'auto',
top: 'auto'
});
});​
let me know what's the effect..
It could be that you're trying to apply a z-index to elements which have not been given the position absolute property also?

Categories

Resources