Code:
<script type="text/javascript">
var Imtech = {};
Imtech.Pager = function() {
this.paragraphsPerPage = 1;
this.currentPage = 3;
this.pagingControlsContainer = "#pagingControls";
this.pagingContainerPath = "#content";
this.numPages = function() {
var numPages = 0;
if (this.paragraphs != null && this.paragraphsPerPage != null) {
numPages = Math.ceil(this.paragraphs.length / this.paragraphsPerPage);
}
return numPages;
};
this.showPage = function(page) {
this.currentPage = page;
var html = "";
for (var i = (page-1)*this.paragraphsPerPage; i < ((page-1)*this.paragraphsPerPage) + this.paragraphsPerPage; i++) {
if (i < this.paragraphs.length) {
var elem = this.paragraphs.get(i);
html += "<" + elem.tagName + ">" + elem.innerHTML + "</" + elem.tagName + ">";
}
}
$(this.pagingContainerPath).html(html);
renderControls(this.pagingControlsContainer, this.currentPage, this.numPages());
}
var renderControls = function(container, currentPage, numPages) {
var pagingControls = "Stranica: <ul>";
for (var i = 1; i <= numPages; i++) {
if (i != currentPage) {
pagingControls += "<li><a href='#' onclick='pager.showPage(" + i + "); return false;'>" + i + "</a></li>";
} else {
pagingControls += "<li>" + i + "</li>";
}
}
pagingControls += "</ul>";
$(container).html(pagingControls);
}
}
var pager = new Imtech.Pager();
$(document).ready(function() {
pager.pagingContainer = $("#content");
pager.paragraphs = $("table", pager.pagingContainer);
pager.showPage(1);
});
</script>
<script type="text/javascript">
var Imtech = {};
Imtech.Pager = function() {
this.paragraphsPerPage = 1;
this.currentPage = 3;
this.pagingControlsContainer = "#pagingControls";
this.pagingContainerPath = "#content";
this.numPages = function() {
var numPages = 0;
if (this.paragraphs != null && this.paragraphsPerPage != null) {
numPages = Math.ceil(this.paragraphs.length / this.paragraphsPerPage);
}
return numPages;
};
this.showPage = function(page) {
this.currentPage = page;
var html = "";
for (var i = (page-1)*this.paragraphsPerPage; i < ((page-1)*this.paragraphsPerPage) + this.paragraphsPerPage; i++) {
if (i < this.paragraphs.length) {
var elem = this.paragraphs.get(i);
html += "<" + elem.tagName + ">" + elem.innerHTML + "</" + elem.tagName + ">";
}
}
$(this.pagingContainerPath).html(html);
renderControls(this.pagingControlsContainer, this.currentPage, this.numPages());
}
var renderControls = function(container, currentPage, numPages) {
var pagingControls = "Stranica: <ul>";
for (var i = 1; i <= numPages; i++) {
if (i != currentPage) {
pagingControls += "<li><a href='#' onclick='pager.showPage(" + i + "); return false;'>" + i + "</a></li>";
} else {
pagingControls += "<li>" + i + "</li>";
}
}
pagingControls += "</ul>";
$(container).html(pagingControls);
}
}
var pager = new Imtech.Pager();
$(document).ready(function() {
pager.pagingContainer = $("#content");
pager.paragraphs = $("table", pager.pagingContainer);
pager.showPage(1);
});
</script>
A ovo je ono sto ja pokusavam da mi bude u 3 strane plus da reaguje prettyphoto ( NAPOMENA: Meni prva stranica hoce da pokrece skriptu prettyphoto ali ostale nece pa ako neko zna resenje stvarno bi mi znacilo? ) , nadam se da neko zna sta je prettyphoto ako ne zna nije mi problem postaviti link da bude jasnije samo ga moram naci

Code:
<table>
<tr>
<td><a href="images/galery/16.jpg" rel="prettyPhoto[shop]"><img src="images/galery/16.jpg" class="proba" width="285px" height="200px"></a></td>
<td><a href="images/galery/17.jpg" rel="prettyPhoto[shop]"><img src="images/galery/17.jpg" class="proba" width="285px" height="200px"></a></td>
</tr>
<tr>
<td><a href="images/galery/18.jpg" rel="prettyPhoto[shop]"><img src="images/galery/18.jpg" class="proba" width="285px" height="200px"></a></td>
<td><a href="images/galery/19.jpg" rel="prettyPhoto[shop]"><img src="images/galery/19.jpg" class="proba" width="285px" height="200px"></a></td>
</tr>
<tr>
<td><a href="images/galery/20.jpg" rel="prettyPhoto[shop]"><img src="images/galery/20.jpg" class="proba" width="285px" class="proba" height="200px"></a></td>
<td><a href="images/galery/21.jpg" rel="prettyPhoto[shop]"><img src="images/galery/21.jpg" class="proba" width="285px" height="200px"></a></td>
</tr>
<tr>
<td><a href="images/galery/22.jpg" rel="prettyPhoto[shop]"><img src="images/galery/22.jpg" class="proba" width="285px" class="proba" height="200px"></a></td>
<td><a href="images/galery/23.jpg" rel="prettyPhoto[shop]"><img src="images/galery/23.jpg" class="proba" width="285px" height="200px"></a></td>
</tr>
</table>
<table>
<tr>
<td><a href="images/galery/16.jpg" rel="prettyPhoto[shop]"><img src="images/galery/16.jpg" class="proba" width="285px" height="200px"></a></td>
<td><a href="images/galery/17.jpg" rel="prettyPhoto[shop]"><img src="images/galery/17.jpg" class="proba" width="285px" height="200px"></a></td>
</tr>
<tr>
<td><a href="images/galery/18.jpg" rel="prettyPhoto[shop]"><img src="images/galery/18.jpg" class="proba" width="285px" height="200px"></a></td>
<td><a href="images/galery/19.jpg" rel="prettyPhoto[shop]"><img src="images/galery/19.jpg" class="proba" width="285px" height="200px"></a></td>
</tr>
<tr>
<td><a href="images/galery/20.jpg" rel="prettyPhoto[shop]"><img src="images/galery/20.jpg" class="proba" width="285px" class="proba" height="200px"></a></td>
<td><a href="images/galery/21.jpg" rel="prettyPhoto[shop]"><img src="images/galery/21.jpg" class="proba" width="285px" height="200px"></a></td>
</tr>
<tr>
<td><a href="images/galery/22.jpg" rel="prettyPhoto[shop]"><img src="images/galery/22.jpg" class="proba" width="285px" class="proba" height="200px"></a></td>
<td><a href="images/galery/23.jpg" rel="prettyPhoto[shop]"><img src="images/galery/23.jpg" class="proba" width="285px" height="200px"></a></td>
</tr>
</table>
^vip^