我想为图片库进行分页,如果我点击 2,它们应该是一个包含 2-8 的下拉菜单,它应该只在第一行显示两个图片,其余图片应该在第一行闲置,无需隐藏
example: if i click on 2 (consider their will be 9 images in gallery)
[1,2]
[3,4]
[5,6]
[7,8]
[9,0]
if i click on 3
[1,2,3]
[4,5,6]
[7,8,9]
like wise
这是我的代码
http://jsfiddle.net/rajaeerasd/GbA2C/
<!DOCTYPE html>
<html>
<head>
<title>Easylib Soft</title>
<link rel="stylesheet" href="style.css">
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://cdn.jquerytools.org/1.2.6/full/jquery.tools.min.js"></script>
<script type="text/javascript" src="https://sites.google.com/site/alauddinansari7/jColorPicker.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#colorPicker").ColorPicker({selectedColor:'#fff', onSelect:
function(color){
document.body.bgColor=color;
}
});
});
</script>
<!--[if (gte IE 6)&(lte IE 8)]>
<script src="selectivizr.js"></script>
<![endif]-->
<style>
#about{
color: #999;
text-align: center;
font: 0.9em Arial, Helvetica;
}
#about a{
color: #777;
}
</style>
</head>
<body>
<div id="colorPicker">colorPicker</div>
<ul class="menu">
<li tabindex="1">
<a href="http://www.google.co.in/"><span class="title">One</span></a>
</li>
<li tabindex="1">
<span class="title">Two</span>
</li>
<li tabindex="1">
<span class="title">Three</span>
</li>
<li tabindex="1">
<span class="title">Four</span>
</li>
<li tabindex="1">
<span class="title">Five</span>
</li>
<li tabindex="1">
<span class="title">Six</span>
</li>
<li tabindex="1">
<span class="title">Seven</span>
</li>
<li tabindex="1">
<span class="title">Eight</span>
</li>
<li>
<span class="title">Nine</span>
</li>
</ul>
<!-- BSA AdPacks code -->
<script>
(function(){
var bsa = document.createElement('script');
bsa.async = true;
bsa.src = 'www.google.com';
(document.getElementsByTagName('head')[0]||document.getElementsByTagName('body')[0]).appendChild(bsa);
})();
</script>
</body>
</html>