I have a problem with this code...
The preloader shows up when this function is fired, but it never hides.
The page also shows up before the image inside it is finished loading.
Is there something wrong with my load function?
$('select.select').change(function() {
var x = $(this).val();
//Hide the current page and show the preloader
$('#page' + x).hide();
$('#pageLoader *').show();
//when current page is loaded, hide preloader and show page
$('#page' + x + ' img').load(function() {
$('#page' + x).show();
$('#pageLoader *').hide();
});
});