[wp-trac] [WordPress Trac] #19102: Javascript execution in MU

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 2 15:15:53 UTC 2011


#19102: Javascript execution in MU
-------------------------------+------------------------------
 Reporter:  johncolvin         |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Multisite          |     Version:  3.2.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |
-------------------------------+------------------------------

Comment (by johncolvin):

 The error is:

 {{{
 Uncaught TypeError: Object [object Object] has no method 'anythingSlider'
 }}}


 The anything slider plugin is enqueuing all of its javascript files.

 I'm enqueueing the javascript on my front page like this:


 {{{
 wp_enqueue_script('front-page', get_bloginfo('template_directory') . '/js
 /front-page.js', array('jquery'));
 get_header();
 }}}


 This is the entire contents of front-page.js:

 {{{
 jQuery(document).ready(function(){
   jQuery('#slider').anythingSlider();
 });
 }}}

 I've attached my front page template and the javascript enqueued on that
 page.

 You can see the error in action here: https://upilot.asc.ohio-state.edu/

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19102#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list