Not entirely sure what code to post... I'm pretty much using the stepcarousel out of the box except changed a few classes, etc... Thank you so much for the help with this! Hopefully it's something stupid that I'm overlooking.
POPUP JS
Code:
//0 means disabled; 1 means enabled;
var popupStatus = 0;
function loadPopup(){
if(popupStatus==0){
$("#backgroundPopup").css({
"opacity": "0.7"
});
$("#backgroundPopup").fadeIn("slow");
$("#popupIPAD").fadeIn("slow");
popupStatus = 1;
}
}
function disablePopup(){
if(popupStatus==1){
$("#backgroundPopup").fadeOut("slow");
$("#popupIPAD").fadeOut("slow");
popupStatus = 0;
}
}
function centerPopup(){
var windowWidth = document.documentElement.clientWidth;
var windowHeight = document.documentElement.clientHeight;
var popupHeight = $("#popupIPAD").height();
var popupWidth = $("#popupIPAD").width();
$("#popupIPAD").css({
"position": "fixed",
"top": windowHeight/2-popupHeight/2,
"left": windowWidth/2-popupWidth/2
});
$("#backgroundPopup").css({
"height": windowHeight
});
}
$(document).ready(function(){
$("#button").click(function(){
centerPopup();
loadPopup();
});
$("#popupClose").click(function(){
disablePopup();
});
$("#backgroundPopup").click(function(){
disablePopup();
});
$(document).keypress(function(e){
if(e.keyCode==27 && popupStatus==1){
disablePopup();
}
});
});
CSS
Code:
#backgroundPopup{
display:none;
position:fixed;
_position:absolute; /* hack for internet explorer 6*/
height:100%;
width:100%;
top:0;
left:0;
background:#000000;
border:1px solid #cecece;
z-index:1;
}
#popupIPAD{
display:none;
position:fixed;
_position:absolute; /* hack for internet explorer 6*/
height:auto;
width:700px;
background:#FFF;
border:2px solid #cecece;
z-index:2;
padding:12px;
font-size:13px;
}
#popupClose{
font-family:Verdana, Geneva, sans-serif;
font-size:10px;
line-height:10px;
/*right:4px;
top:4px;
position:absolute;*/
color:#333;
font-weight:normal;
/*display:block;
*/}
#button{
text-align:center;
margin:100px;
}
#button.IPAD{
text-align:center;
margin:0;
}
#modalWrapper {
width:700px;
height:auto;
margin: 0 auto:
}
#header {
height:95px;
margin-bottom: 0;
}
.stepcarousel{
position: relative; /*leave this value alone*/
/*border: 1px solid black;*/
overflow: scroll; /*leave this value alone*/
width: 700px; /*Width of Carousel Viewer itself*/
height: 390px; /*Height should enough to fit largest content's height*/
}
.stepcarousel .featured{
position: absolute; /*leave this value alone*/
left: 0;
top: 60px;
}
.stepcarousel .panel{
float: left; /*leave this value alone*/
overflow: hidden; /*clip content that go outside dimensions of holding panel DIV*/
margin: 10px 0px; /*margin around each panel*/
/*width: 340px; Width of each panel holding each content. If removed, widths should be individually defined on each content DIV then. */
border-right: 1px solid #CCC;
text-align:center;
}
#salestext {
margin:10px auto;
text-align:center;
font-family:'Trebuchet MS', Arial, Helvetica, sans-serif;
font-size:18px;
font-weight:bold;
}
.img {
border:none;
}
HTML
Code:
<!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>test</title>
<link href="images/popUp_TEST.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
<script type="text/javascript" src="images/popUp_TEST.js"></script>
<script type="text/javascript" src="images/stepcarousel_TEST.js"></script>
<script type="text/javascript">
stepcarousel.setup({
galleryid: 'store', //id of carousel DIV
beltclass: 'featured', //class of inner "featured" DIV containing all the panel DIVs
panelclass: 'panel', //class of panel DIVs each holding content
autostep: {enable:true, moveby:1, pause:3000},
panelbehavior: {speed:500, wraparound:true, wrapbehavior:'slide', persist:true},
defaultbuttons: {enable: true, moveby: 1, leftnav: ['images/modal_arrow_left.png', 0, 0], rightnav: ['images/modal_arrow_right.png', -44, 0]},
//statusvars: ['statusA', 'statusB', 'statusC'], //register 3 variables that contain current panel (start), current panel (last), and total panels
contenttype: ['inline'] //content setting ['inline'] or ['ajax', 'path_to_external_file']
});
</script>
</head>
<body>
<div id="button" style="cursor:pointer;" class="IPAD">CLICK HERE</div>
<div id="popupIPAD">
<div id="modalWrapper">
<div id="header"><a id="popupClose" style="cursor:pointer;"><img src="images/modal_header.gif" align="" /></a></div>
<div id="store" class="stepcarousel">
<div id="salestext">SALES TEXT HERE:</div>
<br clear="left" />
<div class="featured">
<div class="panel" style="width:235px;">
<img src="images/modal_panel1.jpg" class="img" />
</div>
<div class="panel" style="width:295px;">
<img src="images/modal_panel2.jpg" class="img" />
</div>
<div class="panel" style="width:235px;">
<img src="images/modal_panel1.jpg" class="img" />
</div>
<div class="panel" style="width:295px;">
<img src="images/modal_panel2.jpg" class="img" />
</div>
<div class="panel" style="width:235px; border-right:none;">
<img src="images/modal_panel1.jpg" class="img" />
</div>
</div>
</div>
</div>
</div>
<div id="backgroundPopup"></div>
</body>
</html>
Bookmarks