Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
135
rated 0 times [  142] [ 7]  / answers: 1 / hits: 55980  / 12 Years ago, fri, february 15, 2013, 12:00:00

For some reason the jQuery UI Accordion does not work. I keep getting this error:




TypeError: $(...).accordion is not a function




What am i doing wrong? Based on other answers on this site on similar topics, i think it has something to do with the included files.



My header includes are:



<!-- Mobile Specific Metas -->
<meta name=viewport content=width=device-width, initial-scale=1, maximum-scale=1>

<!-- CSS -->
<link rel=stylesheet href=<?php echo base_url(); ?>css/base_con.css>
<link rel=stylesheet href=<?php echo base_url(); ?>css/skeleton.css>
<link rel=stylesheet href=<?php echo base_url(); ?>css/layout.css>

<!--[if lt IE 8]>
<script src=http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE8.js></script>
<![endif]-->

<!--[if lt IE 9]>
<script src=http://html5shim.googlecode.com/svn/trunk/html5.js></script>
<![endif]-->

<!-- Favicons -->
<link rel=shortcut icon href=<?php echo base_url(); ?>images/favicon.ico>
<link rel=apple-touch-icon href=<?php echo base_url(); ?>images/apple-touch-icon.png>
<link rel=apple-touch-icon sizes=72x72 href=images/apple-touch-icon-72x72.png>
<link rel=apple-touch-icon sizes=114x114 href=images/apple-touch-icon-114x114.png>
<link rel=stylesheet href=<?php echo base_url(); ?>css/custom-theme/jquery-ui-1.10.0.custom.css type=text/css />

<!-- Scripts -->
<script src=<?php echo base_url(); ?>js/jquery-1.9.0.js></script>
<script src=<?php echo base_url(); ?>js/jquery-ui-1.10.0.custom.js></script>
<script src=<?php echo base_url(); ?>js/responsiveslides.min.js type=text/javascript>

More From » jquery

 Answers
22

This problem could arise from a couple of different things:




  • You are not including jQuery UI library.

  • You are including jQuery UI library above the inclusion of jQuery library

  • The path to jQuery UI and jQuery libraries might be incorrect

  • You are using a custom jQuery UI library that does not have an accordion



Since the first two do not apply to you, I would recommend triple-checking the path and using a full jQuery UI library instead of the custom one:



<script src=http://code.jquery.com/ui/1.10.0/jquery-ui.js></script>

[#80203] Thursday, February 14, 2013, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jimmieo

Total Points: 515
Total Questions: 102
Total Answers: 110

Location: Kazakhstan
Member since Mon, Sep 26, 2022
2 Years ago
;