I made a slide show using jquery. it shows the images, and it resize-the div(image holder). everything is ok with this.
once a person navigating to new image, as well he close the pop-up of the slide show. Then later he opens the slide show again, the old size of the slide is not ch开发者_如何学Canging, to close the pop-up i am using this function.
$('#close-pop').click(function(){
$('#slider').hide();
$('#imgHolder').hide();
$('#imgHolder img').remove();
})
but no use of from this code. what i need is, once a person closing the pop-up button, all functions have to reset in to default(primary) state. how can i achive this? if any way to reset the document.ready function, i believe that would be fine..
any ideas?
If you want to use your code being executed on $(document).ready again, just put it in a function:
var initPage = function() {
// some actions...
};
$(document).ready(initPage);
That way you can execute it again, when the popup is closed:
$('#close-pop').click(initPage);
精彩评论