JQueryUI with Google's CDN issue
I'm having trouble loading JQueryUI from Google's CDN. I've got an ASP.NET application that and am using this to call the scripts:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jq开发者_StackOverflow中文版uery.min.js" type="text/javascript"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js" type="text/javascript"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/ui-darkness/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
$(function() {
$("#accordion").accordion();
});
</script>
</asp:Content>
I then have a test accordion:
<div id="accordion">
<h3><a href="#">First header</a></h3>
<div>First content</div>
<h3><a href="#">Second header</a></h3>
<div>Second content</div>
</div>
However, this doesn't work. I used Chrome's Dev tool and I get this error:
Uncaught Error: The 'accordion' plugin requires Sys.scripts.ExtendedAccordion to be loaded with a call to Sys.require() first
I'm also using MS' Ajax CDN in my masterpage, so could that be causing a problem?
Thanks
It looks like you have a conflict between the MS Ajax oolkit accordion and the jQuery UI accordion. Can you remove the Ajax Toolkit?
精彩评论