1

Well basically I'm trying to implement Sidr which is from here (http://www.berriart.com/sidr/)

I just want it work, I have added the scripts to function.php and even did alerts to test they were loading and running. Here's how I added them.

add_action( 'wp_enqueue_scripts', 'blankslate_load_scripts' );
function blankslate_load_scripts()
{
wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'Sidr', get_template_directory_uri() . '/js/jquery.sidr.min.js' );
wp_enqueue_script( 'Sidr-run', get_template_directory_uri() . '/js/jquery.run.min.js' );
wp_enqueue_style( 'sidr-css', get_stylesheet_directory_uri() . '/css/jquery.sidr.light.css' );
}

I've check in the inspector on chrome and I have confirmed its loading the scripts, I looked at the console and just saw it blank aside from it showing this

[cycle2] --c2 init--

The div displays, everything is there. The code itself to make the box slide in from the left to right is the only thing not working. I'm using the first basic demo he has on his page where it slides from the left side with the list of links.

At this point I'm beyond frustrated so that's why I'm hoping someone here can find the issue.

the website I'm testing this on is ('http://chocobento.x10.mx/wp/')

1 Answers1

1

You're using

$(document).ready(function() {
  $('#simple-menu').sidr();
});

When you should be using

jQuery(document).ready(function() {
  jQuery('#simple-menu').sidr();
});

or

(function($) {
  $(document).ready(function() {
      $('#simple-menu').sidr();
    });
}(jQuery));

See https://wordpress.stackexchange.com/questions/2895/not-defined-using-jquery-in-wordpress

Community
  • 1
  • 1
Clayton Leis
  • 1,288
  • 9
  • 20
  • I felt like I tried this before but I won't complain. Ironically I'm going to use this instead (http://tympanus.net/codrops/2013/08/28/transitions-for-off-canvas-navigations/) so at least I have the peace of mind that adding scripts is easy :) – コードバ リノ Aug 29 '15 at 08:37