I'm looking for a slideshow tool (for jquery) which i can load in a dialog and every time i click on the next or previous button i load the content from the database.
If i use the dialog jquery-ui widget and i add buttons, it puts them below the content. And i want them to be on the side, as it is the way the client asked:
with the following js code the dialog looks like this:
$(function() {
var x = 1;
$('#dialog').dialog({buttons:
{
Next: function() {
x++; // Increment counter
$(this).text(x); // Build dialog based on new value
},
Prev: function() {
x--; // Decrement counter
$(this).text(x); // Build dialog based on new value
}
}
});
});
<div id="dialog" title="Basic dialog">
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
Somebody told me that it's better if i load all the content when the page is loading, but, what happens if there are 10000 or 15000 divs, each one with html content and image. My first thougth was "the page will take too long to include those objects, and maybe they will never be clicked by the user" and that's what i told him. And he told me, "as you'll be growing in web developmente you'll want to avoid requests"
If it's better to have a dialog which has next a previous button on the side, which tool can i use?
The page is beeing made on Rails with jquery
Thanks in advance for your opinions.