-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
JQueryUI tabs behaves weirdly if base in HTML head #2192
Comments
You need to wrap code in backticks since Markdown is an extension of HTML and tags have a meaning. I edited your post for you. The |
I appreciate your response, and the link to the blog post, but I'm disappointed that this is closed without further consideration. The side-effects from having The most typical use of JQueryUI tabs is to use the Using There's no logical reason to apply the base url to a fragment. A fragment indicates a point on the page, a bookmark, it does not represent the contents of that element. And, even if it did, the implementation is still wrong, because it loads the entire page - not just the contents of the element. In summary:
|
It's not jQuery UI which is applying As explained in the blog post, the goal of the jQuery UI design here is to degrade gracefully - if the link is to the URL identical with the current one, just with the hash changed, the browser will scroll to the element with the ID matching the hash; if the URL is different beyond the hash, the browser will redirect to the new URL. If you have a page with the address <a href="#main">Go to main content</a>
<h1 id="main">Main content</h1> then clicking on the link will scroll to the If you have HTML structure similar to the above and you expect the link to show you the main content, your HTML is just incorrect and that's true regardless of jQuery UI presence or not. BTW, if |
I had a weird problem with JQueryUI tabs. Instead of turning the divs into tabs it would create new divs and then load the page content into those divs on activation. Very, very weird! After much hair-pulling and code minimising it turns out to be something rather surprising that causes this - have a
<base>
tag in the HTML head.Reproducing the problem is EASY!
<base href="http://localhost/"/>
The text was updated successfully, but these errors were encountered: