02 enero 2008

Paginación Virtual

Este script es de gran utilidad en cuanto a la velocidad, ya que todo se actualiza en la misma página, sin necesidad de mandar llamar al servidor, bueno aquí les dejo el código y una pequeña captura.



El siguiente codigo entre las etiquetas Head y /Head
<script type="text/javascript" src="virtualpaginate.js">

</script>

<style type="text/css">

/*Sample CSS used for the Virtual Pagination Demos. Modify/ remove as desired*/

.virtualpage, .virtualpage2, .virtualpage3{
/*hide the broken up pieces of contents until script is called. Remove if desired*/
display: none;
}

.paginationstyle{ /*Style for demo pagination divs*/
width: 250px;
text-align: center;
padding: 2px 0;
margin: 10px 0;
}

.paginationstyle select{ /*Style for demo pagination divs' select menu*/
border: 1px solid navy;
margin: 0 15px;
}

.paginationstyle a{ /*Pagination links style*/
padding: 0 5px;
text-decoration: none;
border: 1px solid black;
color: navy;
background-color: white;
}

.paginationstyle a:hover, .paginationstyle a.selected{
color: #000;
background-color: #FEE496;
}

.paginationstyle a.imglinks{ /*Pagination Image links style (class="imglinks") */
border: 0;
padding: 0;
}

.paginationstyle a.imglinks img{
vertical-align: bottom;
border: 0;
}

.paginationstyle a.imglinks a:hover{
background: none;
}

.paginationstyle .flatview a:hover, .paginationstyle .flatview a.selected{ /*Pagination div "flatview" links style*/
color: #000;
background-color: yellow;
}

</style>

Descargar virtualpaginate.js


El siguiente codigo entre las etiquetas Body y /Body:
<!--###### Virtual Pagination Demo 1 ######### -->
<h3>Demo 1:</h3>

<div style="width: 300px; height: 230px;">

<div class="virtualpage">
<img src="http://img184.imageshack.us/img184/1159/castleyi6.gif" />
</div>

<div class="virtualpage">
<img src="http://img201.imageshack.us/img201/7907/streetkz4.gif" />
</div>

<div class="virtualpage">
<img src="http://img201.imageshack.us/img201/8538/weedjh8.gif" />
</div>

<div class="virtualpage">
<img src="http://img201.imageshack.us/img201/6923/countryxb6.gif" />
</div>

</div>

<!-- Pagination DIV for Demo 1 -->
<div id="gallerypaginate" class="paginationstyle">
<a href="#" rel="previous">Prev</a> <span class="flatview"></span> <a href="#" rel="next">Next</a>
</div>

<!-- Initialize Demo 1 -->
<script type="text/javascript">
var gallery=new virtualpaginate("virtualpage", 1)
gallery.buildpagination("gallerypaginate")
</script>



<!--###### Virtual Pagination Demo 2 ######### -->
<h3>Demo 2:</h3>

<div style="width: 450px; height: 200px; border: 1px dashed gray; padding: 10px; background-color: #EEFFAA">

<p class="virtualpage2">
<b><a href="#">RSS Display Boxes</a></b> <span class="credits">Credits: Dynamic Drive</span><br>
Tme to get your RSS on! Using Ajax, this script makes it easy to display RSS feeds from other sites inside DIV containers, by communicating with a versatile PHP RSS parser called "Simplepie". Each RSS box can be independently tailored, from the RSS feed to fetch, how many items to show (and whether to paginate them), to what portions of each entry (just the "title", or "title" plus "description" etc) to display.
</p>

<p class="virtualpage2">
<b><a href="#">Interstitial Content Box</a></b> <span class="credits">Credits: Dynamic Drive</span><br>
An interstitial is a container that appears over an entire webpage intermittingly to display content in an eye catching way. This is a Interstitial Box script that uses <b>Ajax</b> to fetch and display the contents of external pages on your server as an interstitial.
</p>

<p class="virtualpage2">
<b><a href="#">Omni Slide Menu</a></b> <span class="credits">Credits: John Scheuer</span><br>
Omni Slide Menu is an super versatile slideout menu that reacts to the mouse hovering over and out of it. It can be positioned to the left, top, or right edge of the browser window, supports static positioning, plus multiple instances of the same menu on a page and more. Very cool.
</p>

<p class="virtualpage2">
<b><a href="#">Custom Cursor Script II (Crosshair mouse cursor)</a></b> <span class="credits">Credits: Webtoolkit.info</span><br>
This script adds a custom cursor to your webpage using an interchangeable image. The result is a custom mouse cursor that can be modified in anyway your graphic skills take you. Elegant and non intrusive effect!
</p>

<p class="virtualpage2">
<b><a href="#">Drop Down Tab Menu</a></b> <span class="credits">Credits: Dynamic Drive</span><br>
This is a lean CSS tab menu that supports a 2nd level drop down menu for any of its tabs. It supports subtle yet helpful features such as the ability to set a default selected tab, hide any element on the page (ie: a form field) when the menu drops down etc.
</p>

<p class="virtualpage2">
<b><a href="#">Featured Content Slider</a></b> <span class="credits">Credits: Dynamic Drive</span><br>
Featured Content Slider makes a slideshow out of arbitrary content on your page, so users can manually select a content to see or have them rotated automatically. Pagination links let the user quickly pick a content to show. Each content is simply normal HTML wrapped in DIV tags for effortless integration.
</p>

</div>

<!-- Pagination DIV for Demo 2 -->
<div id="scriptspaginate" class="paginationstyle" style="width: 400px">
<a href="#" rel="first">F</a> <a href="#" rel="previous">Prev</a> <span class="paginateinfo" style="margin: 0 30px; font-weight: bold"></span> <a href="#" rel="next">Next</a> <a href="#" rel="last">L</a>
</div>

<!-- Initialize Demo 2 -->
<script type="text/javascript">
var newscripts=new virtualpaginate("virtualpage2", 1, "p") //Let script know you're using "p" tags as separator (instead of default "div")
newscripts.buildpagination("scriptspaginate")
</script>



<!--###### Virtual Pagination Demo 3 ######### -->
<h3>Demo 3:</h3>

<!-- Pagination DIV for Demo 3 -->
<div id="listingpaginate" class="paginationstyle">
<a href="#" rel="previous" class="imglinks"><img src="http://img293.imageshack.us/img293/8643/roundleftig4.gif" /></a> <select></select> <a href="#" rel="next" class="imglinks"><img src="http://img183.imageshack.us/img183/3816/roundrightat5.gif" /></a>
</div>

<div style="width: 450px; border: 1px dashed gray; padding: 10px;">

<p class="virtualpage3">
<b><a href="#">RSS Display Boxes</a></b> <span class="credits">Credits: Dynamic Drive</span><br>
Tme to get your RSS on! Using Ajax, this script makes it easy to display RSS feeds from other sites inside DIV containers, by communicating with a versatile PHP RSS parser called "Simplepie". Each RSS box can be independently tailored, from the RSS feed to fetch, how many items to show (and whether to paginate them), to what portions of each entry (just the "title", or "title" plus "description" etc) to display.
</p>

<p class="virtualpage3">
<b><a href="#">Interstitial Content Box</a></b> <span class="credits">Credits: Dynamic Drive</span><br>
An interstitial is a container that appears over an entire webpage intermittingly to display content in an eye catching way. This is a Interstitial Box script that uses <b>Ajax</b> to fetch and display the contents of external pages on your server as an interstitial.
</p>

<p class="virtualpage3">
<b><a href="#">Omni Slide Menu</a></b> <span class="credits">Credits: John Scheuer</span><br>
Omni Slide Menu is an super versatile slideout menu that reacts to the mouse hovering over and out of it. It can be positioned to the left, top, or right edge of the browser window, supports static positioning, plus multiple instances of the same menu on a page and more. Very cool.
</p>

<p class="virtualpage3">
<b><a href="#">Custom Cursor Script II (Crosshair mouse cursor)</a></b> <span class="credits">Credits: Webtoolkit.info</span><br>
This script adds a custom cursor to your webpage using an interchangeable image. The result is a custom mouse cursor that can be modified in anyway your graphic skills take you. Elegant and non intrusive effect!
</p>

<p class="virtualpage3">
<b><a href="#">Drop Down Tab Menu</a></b> <span class="credits">Credits: Dynamic Drive</span><br>
This is a lean CSS tab menu that supports a 2nd level drop down menu for any of its tabs. It supports subtle yet helpful features such as the ability to set a default selected tab, hide any element on the page (ie: a form field) when the menu drops down etc.
</p>

<p class="virtualpage3">
<b><a href="#">Featured Content Slider</a></b> <span class="credits">Credits: Dynamic Drive</span><br>
Featured Content Slider makes a slideshow out of arbitrary content on your page, so users can manually select a content to see or have them rotated automatically. Pagination links let the user quickly pick a content to show. Each content is simply normal HTML wrapped in DIV tags for effortless integration.
</p>

</div>

<!-- Initialize Demo 3 -->
<script type="text/javascript">
var whatsnew=new virtualpaginate("virtualpage3", 2, "p") //Let script know you're using "p" tags as separator (instead of default "div")
whatsnew.buildpagination("listingpaginate")
</script>


<hr style="margin-top: 35px; color: red" />

<!--###### Virtual Pagination Demo 4 ######### -->
<h3>Demo 4 (shows "flatview" pagination interface with custom text defined):</h3>

<div style="width: 300px; height: 230px;">

<div class="virtualpage4">
<img src="http://img184.imageshack.us/img184/1159/castleyi6.gif" />
</div>

<div class="virtualpage4">
<img src="http://img201.imageshack.us/img201/7907/streetkz4.gif" />
</div>

<div class="virtualpage4">
<img src="http://img201.imageshack.us/img201/8538/weedjh8.gif" />
</div>

<div class="virtualpage4">
<img src="http://img201.imageshack.us/img201/6923/countryxb6.gif" />
</div>

</div>

<!-- Pagination DIV for Demo 4 -->
<div id="galleryalt" class="paginationstyle" style="width: 300px; text-align: left">
<a href="#" rel="previous"><</a> <span class="flatview"></span> <a href="#" rel="next">></a>
</div>

<!-- Initialize Demo 4 -->
<script type="text/javascript">
var gallery=new virtualpaginate("virtualpage4", 1)
gallery.buildpagination("galleryalt", ["castle", "park", "harvest", "country"])
</script>



<!--###### Virtual Pagination Demo 5 ######### -->
<h3>Demo 5 (shows "SELECT" pagination interface with custom text defined):</h3>

<div style="width: 300px; height: 230px;">

<div class="virtualpage5">
<img src="http://img184.imageshack.us/img184/1159/castleyi6.gif" />
</div>

<div class="virtualpage5">
<img src="http://img201.imageshack.us/img201/7907/streetkz4.gif" />
</div>

<div class="virtualpage5">
<img src="http://img201.imageshack.us/img201/8538/weedjh8.gif" />
</div>

<div class="virtualpage5">
<img src="http://img201.imageshack.us/img201/6923/countryxb6.gif" />
</div>

</div>

<!-- Pagination DIV for Demo 5 -->
<div id="galleryselect" class="paginationstyle">
<a href="#" rel="previous">Prev</a> <select style="width: 120px"></select> <a href="#" rel="next">Next</a>
</div>

<!-- Initialize Demo 5 -->
<script type="text/javascript">
var gallery=new virtualpaginate("virtualpage5", 1)
gallery.buildpagination("galleryselect", ["castle", "park", "harvest", "country"])
</script>
Comparte este post con tus amigos!

2 comentarios

Anónimo dice:

http://zianagel.webs.com/#acne-scar-cream
ziana cost [url=http://zianagel.webs.com/#ziana-acne-scars
] ziana topical gel [/url] acne cream ziana acne cream ziana ziana acne gel

Anónimo dice:

Odwiedz swoje mapy nawet w grach internetowy, ze grasz. Pojecie okreg jawi sie byc nadzwyczaj doniosle zwyciestwo. Dokad bywaja najkorzystniejsze punktu, z jakiego sie ukryc jak równiez zasadzki przeciwników? W którym miejscu mozemy wyrzadzic skróty do dostarczaja wyzsze sytuacje strategiczna? Nasz sposób wiedzy teoretycznej wyznacza wazna wladze strategiczna. Rodzice musza oszczedzic troche okresu, zeby spojrzec na konsole samochodu konsol po ustawieniach kontroli rodzicielskiej. Konsole pozostana mialy tego typu inspekcje w toku ich zestawienia na miejscu mojego karcie menuy. Maja prawo ów lampy dozwalaja pilnowac rozrywki poprzez ESRB Ocena, stan periodu za system i ograniczy dojscie samochodu sieci internetowej. Sposród tychze zespolu inspekcji, latorosl bedzie w stanie grac na miejscu mojego rozrywki bardziej spokojnie. Wypróbuj oceny i skalkulowac a po sektorze akcesoriów gwoli ludzi. Sterowniki a, takze pozostale ekwipunek powinny byc kosztowne, co byc moze udaremniac wiele z nas wprawa ich zakupem. Znienacka, istnieje nieco poteznych przedsiebiorstw uslugowych trzecich, gdzie dzialaja tak, kategorii oprzyrzadowanie. Czyz jakiekolwiek egzaminowania, izby upewnic sie poznajemy najwazniejsza game gagag wlasnych kapusty. Zwracaj atencje na to, [url=http://www.gryziko.pl]gry[/url] ile kasy nastolatek spedza na grach internetowy. Wytwory owe rzadko kiedy moga byc niedrogie jak i równiez czesto istnieje sposobnosc zakupienia wiecej addony przy tylko produkcji. Ustaw miesieczne jak i równiez jednoletniejednoroczne limity od stan forsy, w których warto wywalic na gierki przez internet. Poza tym, paktowac wraz z dziecmi na temat budzetowania. Wytrwalosc mozliwy twym najatrakcyjniejszym kumplem, jesli chodzi o kupienie ich produkcji sieciowy. Chociaz zauwazalna wiekszosc big-name rozgrywki uwolnic najlepsze metki, cene spadna ekspresowo nastepnie. Wyczekuje pare miesiecy byc moze uzyskac Takie osoby obszerne zaoszczedzone pieniadze. Jako równoczesny dodatek, nieraz warto odjac korzystniejsze wersje (w mlodym ludziom tematyki Dodatek), pod warunkiem, ze przechowywac sie niewiele. W chwili notowania gry, nie jedynie zapisac go na dodatek danego gniazda. Przy jednym spotkaniu na tydzien, umiescic jego po bardzo odkrywczym. Nadejdzie godzina, jak myslisz na nowo wrócic niewiele sluzace do gierki i dodatkowo skosztowac czegos nowego. Rzadko kiedy masz prawo dostatecznie te opcje, jezeli permanentnie zapisany wzrost w ponizszym danym pomieszczeniu. Gdy handlujesz gre gagag malucha, spojrzec jako zasadniczy, który dopuszcza mlócic przy pare uzytkowników lacznie. Uciecha dopuszczalny samotny dzialanie. Choc znaczace jawi sie byc, by wzbogacic zaprosic czlonek rodu wozu spolecznej oraz uciechy wieloosobowy ma mozliwosc tego dokonac. Zezwalaja one na rodzenstwo i dodatkowo kumple kazdej osobie usiasc i dodatkowo smiac sie oraz dodatkowo rywalizowac wzajemnie. Ewentualnie stateczny z ich produkcji online. Czasami, nie zaakceptowac okaze sie miesieczna oplata spieta poprawnego dostepem. O ile maluchy pragna przylaczyc sie do sale, w których wielu z cechujaca je przyjaciól uzyjesz, upewnij sie, kiedy spojrzec na tek krok poczatkowe. Zanotuj, czyz istnieje jakakolwiek zaangazowane pieniazki, zas o ile istotnie, jest to zostac poinformowanym, czyz gra uzasadnia koszt. Zapisz gre jakim sposobem mozna. W momencie autozapisywanie to perfekcyjna cecha, nie opieraja sie dzieki klientem. Wyjatkowo, jezeli przez przy jednym spotkaniu naczelny rozpoczac mlócic w gre, jest w stanie nie posiadasz wyobrazenia, gdy rozrywka zapisuje, , którzy jest w stanie prowadzic do straty waznych okreslonych przy pózniejszym czasie. Tak dlugo jak swietniej zrozumiec gre, caly czas zapisac sie.