این تو یه سایت خارجی بود ترجمش کردم
خیلی قاطی پاتی بود
از صبح تا الان پاشم نتونستم یکم تمیزتر کنم کدش رو
و امتحان کنید در صورت داشتن مشکل بگید که رفع بشه
http://ali-del.rozblog.com/page/shoping#
این کد قبل از head/
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script src="http://ali-del.rozup.ir/Documents/q1/jquery.animation.easing.js"></script>
<script src="http://ali-del.rozup.ir/Documents/q1/slideMenu.js"></script>
<link rel="stylesheet" href="http://ali-del.rozup.ir/Documents/q1/_reset.css" />
<style type="text/css">
body {font-family: 'Lucida Grande', verdana, sans-serif;font-size:13px;}
a:link, a:visited, a:hover, a:active {color:#234786;text-decoration:none;}
#menu-controls {width:780px;margin:0 auto;padding:10px;text-align:center;border:1px solid #eee;}
#menu-controls a {margin:0 10px;color:#000;outline:none}
#menu-controls a.active {font-weight:bold;}
.options {width:402px;margin:50px auto 0;text-align:center;}
.options span {font-size:10px;font-weight:bold}
.options div{width:200px;float:left}
#menu-container.xray {overflow:visible;}
li a{position:relative;display:block;text-align:center;}
h4{margin-top:10px;font-weight:bold;font-size:14px;line-height:16px;}
#loading{position:absolute;width:31px;height:31px;top:50px;left:370px;
}
#menu-container {
position:relative; /* REQUIRED */
width:800px;
height:140px;
padding:20px 0 30px;
margin:180px auto 0;
overflow:hidden; /* REQUIRED */
border-style:solid;
border-width:1px 1px 0;
border-color:#eee;
}
#menu-container ul {
list-style-type:none; /* REQUIRED */
position:absolute; /* REQUIRED */
right:0; /* REQUIRED */
}
#menu-container ul li {
position:absolute; /* REQUIRED */
width:130px; /* Size of menu list item, or 'cell' */
height:150px; /* Size of menu list item, or 'cell' */
padding:10px
}
</style>
واین کد فروشگاه
<div id="wrapper">
<div id="menu-container">
<div id="loading"></div>
<ul>
<li><a href="#"><img src="assets/img/1a.jpg" /></a><h4><a href="#">LCD Projectors</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1b.jpg" /></a><h4><a href="#">Screens</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1b.jpg" /></a><h4><a href="#">Screens</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1b.jpg" /></a><h4><a href="#">Screens</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1b.jpg" /></a><h4><a href="#">Screens</a></h4></li>
</ul>
<ul>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1a.jpg" /></a><h4><a href="#">Speakers</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1a.jpg" /></a><h4><a href="#">Speakers</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1a.jpg" /></a><h4><a href="#">Speakers</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1a.jpg" /></a><h4><a href="#">Speakers</a></h4></li>
</ul>
<ul>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1c.jpg" /></a><h4><a href="#">Laptops</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1c.jpg" /></a><h4><a href="#">Laptops</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1c.jpg" /></a><h4><a href="#">Laptops</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1c.jpg" /></a><h4><a href="#">Laptops</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/1c.jpg" /></a><h4><a href="#">Laptops</a></h4></li>
</ul>
<ul>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/4b.jpg" /></a><h4><a href="#">Audiovisual</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/4b.jpg" /></a><h4><a href="#">Audiovisual</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/4b.jpg" /></a><h4><a href="#">Audiovisual</a></h4></li>
<li><a href="#"><img src="http://ali-del.rozup.ir/Documents/q1/4b.jpg" /></a><h4><a href="#">Audiovisual</a></h4></li>
</ul>
</div>
<div id="menu-controls">
<a href="#" data-target="1">Pro Audio</a>
<a href="#" data-target="2">Computer & Office</a>
<a href="#" data-target="3">Meeting & Event</a>
</div>
و این هم قبل از /body
<script type="text/javascript">
$(document).ready(function(){
var options = {
div: "#menu-container",
controls: "#menu-controls",
loader: "#loading",
x: 150,
y: 200,
easing: "easeOutBackSmall",
easeIn: "easeOutBack",
preloadAll: true
};
var menu = new slideMenu(options);
var auto = false, x, inc;
// Toggle x-ray
$("#xray a").click(function(){
toggle_xray();
return false;
});
// Toggle auto
$("#auto a").click(function(){
toggle_auto();
return false;
});
// If xray enabled on load, make it so!
if (window.location.hash.substring(1) == 'xray') toggle_xray();
function toggle_xray(){
$(options.div).toggleClass("xray");
$("#xray span").text($(options.div).hasClass("xray") ? 'ON' : 'OFF');
window.location.hash = $(options.div).hasClass("xray") ? 'xray' : '';
}
function toggle_auto(){
if (auto === false){
x = $("#menu-controls a.active").data("target");
auto_advance();
inc = setInterval(auto_advance, 3000);
auto = true;
}
else{
clearInterval(inc);
auto = false;
}
$("#auto span").text(auto === true ? 'ON' : 'OFF');
}
function auto_advance(){
// Max index is 3, so don't go over
x = x < 3 ? x + 1 : 0;
// Using the switchTo method, we can advance the menu to a desired index
menu.switchTo(x);
}
});
</script>
خودم گیج شدم دیگه


