wordpress - Accordion + easing scrolling jquery -


console error:

typeerror: $(...).accordion not function 

jquery in file calljq.js in worpdress (twentytwelve child theme ):

$(function() {     $('#st-accordion').accordion(); }); 

i'd accordion + easing scrolling in page:

http://www.lab-360.it/test-acs/?attachment_id=67

click on "comment" , jquery show comment scrolling top of page.

here source :

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js?ver=3.9.1" type="text/javascript" style=""></script> <script src="http://www.lab-360.it/test-acs/wp-content/themes/twentytwelve/js2/jquery.accordion.js?ver=3.9.1" type="text/javascript"></script> <script src="http://www.lab-360.it/test-acs/wp-content/themes/twentytwelve/js2/jquery.easing.1.3.js?ver=3.9.1" type="text/javascript"></script> <script src="http://www.lab-360.it/test-acs/wp-content/themes/twentytwelve/js2/calljq.js?ver=3.9.1" type="text/javascript"></script> 

i have tried in way:

$('#st-accordion').accordion(); 

it's ok in console accordion , scrolling doesn't work.

is conflict?

i think root of issue don't have accordian action wrapped in document ready function, following...

jquery(document).ready(function($) {     $('#st-accordion').accordion(); }); 

it makes sure js doesn't fire until page has loaded , therefore of html , other js objects available. inline wp tells b/c use jquery no-conflict. more details about half way down following page. http://codex.wordpress.org/function_reference/wp_enqueue_script

also, , may not matter, looks including 2 different versions of jquery on page. 1.6.3 , 1.11. advise use 1 provided wordpress if need older one, i'd remove newer call.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -