Support » How-To and Troubleshooting » enque script not working

enque script not working

  • emaarkhan


    hi, i copied wp_enqueque_script bt when i see my page soruce code, it doesn’t tell the url of google cdn to see if it is loaded..can anyone help me. am i missing something

    function my_scripts_method() {
      wp_deregister_script( 'jquery' );
      wp_register_script( 'jquery',    'http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js');
      wp_enqueue_script( 'jquery' );
    add_action('wp_enqueue_scripts', 'my_scripts_method');

Viewing 1 replies (of 1 total)
  • Don’t register as ‘jquery’. Try ‘gjquery’ or ‘glibjquery’ instead. There seems to be an issue with registering using names whose first characters match WordPress native registrations. You can be part of my experiment. 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘enque script not working’ is closed to new replies.