Hallo zusammen,
I möchte gerne morris.js (siehe http://oesmith.github.com/morris.js/ in meine website einbinden. Die hierzu erforderlochen JS Datien habe ich in meine functions.php eingefügt welche wie folgt aussieht:
Code
// Enqueue the global JS - Ajax will not work without it
wp_enqueue_script( 'dtheme-ajax-js', get_template_directory_uri() . '/_inc/global.js', array( 'jquery' ), $version );
wp_enqueue_script( 'megamenu-js', get_template_directory_uri() . '/_inc/megamenu.js', array( 'jquery' ), $version );
// morris.js Chart scripts
wp_enqueue_script( 'raphael-js', 'https://raw.github.com/DmitryBaranovskiy/raphael/300aa589f5a0ba7fce667cd62c7cdda0bd5ad904/raphael-min.js', array( 'jquery' ) );
wp_enqueue_script( 'morris-js', get_template_directory_uri() . '/_inc/morris/morris.js', array( 'jquery' ) );
wp_enqueue_script( 'example-js', get_template_directory_uri() . '/_inc/morris/example.js', array( 'jquery' ) );
wp_enqueue_script( 'prettify-js', get_template_directory_uri() . '/_inc/morris/prettify.js', array( 'jquery' ) );
Ich sehe nach dem Laden der Seite dass die Dateien korrekt eingebunden sind; Sourcecode:
Code
<script type='text/javascript' src='http://x.com/wp-content/plugins/buddypress/bp-themes/v1/_inc/global.js?ver=20120110'></script>
<script type='text/javascript' src='http://x.com/wp-content/plugins/buddypress/bp-themes/v1/_inc/megamenu.js?ver=20120110'></script>
<script type='text/javascript' src='https://raw.github.com/DmitryBaranovskiy/raphael/300aa589f5a0ba7fce667cd62c7cdda0bd5ad904/raphael-min.js?ver=20120110'></script>
<script type='text/javascript' src='http://x.com/wp-content/plugins/buddypress/bp-themes/v1/_inc/morris/morris.js?ver=20120110'></script>
<script type='text/javascript' src='http://x.com/wp-content/plugins/buddypress/bp-themes/v1/_inc/morris/example.js?ver=20120110'></script>
<script type='text/javascript' src='http://x.com/wp-content/plugins/buddypress/bp-themes/v1/_inc/morris/prettify.js?ver=20120110'></script>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.18/jquery-ui.min.js?ver=1.8.16'></script>
Jedoch kann ich die morris.js Charts nicht in meine Seite einbinden, es wird nichts ausgeworfen.
Was mache ich falsch?
TIA
/Oliver