Skip to content

Instantly share code, notes, and snippets.

@drewwells
Created October 28, 2011 15:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drewwells/1322615 to your computer and use it in GitHub Desktop.
Save drewwells/1322615 to your computer and use it in GitHub Desktop.

Issue with manipulating base href and jQuery UI making ajax calls to the new document.baseURI.

<!DOCTYPE html>
<html>
<head>
<base href="unicorn/" />
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.js"></script>
<script type="text/javascript" src="https://raw.github.com/jquery/jquery-ui/master/ui/jquery.ui.core.js" ></script>
<script type="text/javascript" src="https://raw.github.com/jquery/jquery-ui/master/ui/jquery.ui.widget.js" ></script>
<script type="text/javascript" src="https://raw.github.com/jquery/jquery-ui/master/ui/jquery.ui.tabs.js" ></script>
<title>JS Bin</title>
</head>
<body>
<div>
<ul>
<li><a href="#cool-tab-1">Cool Tab</a></li>
</ul>
<div id="cool-tab-1">My cool tab, no unicorns here.</div>
</div>
</body>
<script type="text/javascript">
$("div").tabs();
</script>
</html>
<img src="pink-unicorn.png" /><br/>
Thanks goes to http://www.babypips.com/school/holy-grail.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment