Home > Scripts > Làm thế nào để reload lại trang chính khi close modal

Làm thế nào để reload lại trang chính khi close modal

Khi sử dụng jquery modal, làm thế nào để reload lại trang chính khi close modal

http://www.ericmmartin.com/projects/simplemodal/

 

jQuery(function ($) {
// Load dialog on page click
$(‘#basic-modal .basic’).click(function (e) {

//load basic modal
// va lam viec gi do

//truoc khi dong lai (close) reload lai cua so chinh
$(‘#basic-modal-content’).modal(
{onClose: function (dialog) {
parent.location.reload(); //reload main page
$.modal.close();  //close modal
}
}
);

return false;
});

});

 

PHP Developer
nhantam

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: