Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload a tab on clicked. #41

Closed
mikezclements opened this issue Jan 3, 2015 · 2 comments
Closed

Reload a tab on clicked. #41

mikezclements opened this issue Jan 3, 2015 · 2 comments

Comments

@mikezclements
Copy link

I'm so very thankful that you made this amazing plugin but may I asked a question. I'm trying to add some codes to enable the tabs to reload once clicked. I add this line of code

activate: function(clicked) {
location.reload(false);
}

unfortunately once I run the code the page keeps on reloading again and again. Hope you can help me. Thank you.

@jellekralt
Copy link
Owner

Hi,
I'm glad you like the plugin :).
The page keeps reloading because the activate function runs on first load, because when loaded, the first tab is opened. If you want this to work you could add a check so that when the activate function is run for the first time, the location.reload doesn't run.

@mikezclements
Copy link
Author

Good day,

Finally solve this, I fix it by adding onClick="window.location.reload() attribute on link of tab title.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants