Title: jQuery dependency problem
Last modified: August 20, 2016

---

# jQuery dependency problem

 *  [cardy_web](https://wordpress.org/support/users/cardy_web/)
 * (@cardy_web)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/jquery-dependency-problem/)
 * Hi,
    I’ve found that you’re including javascript files in the wrong manner. Actually
   you’re doin’ something like this:
 * `echo('<script type="text/javascript" src="'.$this->plugin_url.$js_name.'"></
   script>');`
 * while the right way is the one explained here:
    [http://codex.wordpress.org/Function_Reference/wp_enqueue_script](http://codex.wordpress.org/Function_Reference/wp_enqueue_script)
 * Because of this, is not possible to move jQuery include in footer because you’re
   script is called early in the <head> section.
 * I suggest you to use something like this:
    `wp_enqueue_script(‘gdjsr’,$this->
   plugin_url.$js_name,array(‘jquery’),$version,true);’
 * Doin’ the aforementioned edit for all rhe js files, let everything works well
   again.
 * [http://wordpress.org/extend/plugins/gd-star-rating/](http://wordpress.org/extend/plugins/gd-star-rating/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [cardy_web](https://wordpress.org/support/users/cardy_web/)
 * (@cardy_web)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/jquery-dependency-problem/#post-3501989)
 * Btw, I’ve edited /code/class.php on line 1350 (3rd and 5th params) :
    `wp_enqueue_script("
   gdsr_script", plugins_url($js_name), array(), $this->o["version"]);` new version:
 *     ```
       wp_enqueue_script("gdsr_script", plugins_url($js_name), array('jquery'), $this->o["version"],false);
       ```
   
 * line 1837:
    `wp_enqueue_script('gdsr',$this->plugin_url.$js_name,array('jquery'),
   false,true);`

Viewing 1 replies (of 1 total)

The topic ‘jQuery dependency problem’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/gd-star-rating_333071.svg)
 * [GD Star Rating](https://wordpress.org/plugins/gd-star-rating/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gd-star-rating/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gd-star-rating/)
 * [Active Topics](https://wordpress.org/support/plugin/gd-star-rating/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gd-star-rating/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gd-star-rating/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [cardy_web](https://wordpress.org/support/users/cardy_web/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/jquery-dependency-problem/#post-3501989)
 * Status: not resolved