wordpress - Backbone Local Storage “undefined is not a function” -


i'm stumped here. i'm loading scripts in correct order, confirmed viewing source , i'm still getting error in console:

 app.todolist = backbone.collection.extend({     model: app.todo,     localstorage: new backbone.localstorage("backbone-todo")     // uncaught typeerror: undefined not function  });  app.todolist = new app.todolist(); 

here's how i'm queueing scripts:

function av_one_load_scripts() {     wp_register_script( 'backbone_localstorage', 'https://raw.github.com/jeromegn/backbone.localstorage/master/backbone.localstorage-min.js', array( 'backbone' ) );     wp_register_script( 'bb_one', get_stylesheet_directory_uri() . '/js/bb_one.js', array( 'jquery', 'backbone', 'backbone_localstorage' ) );      wp_enqueue_script( 'backbone' );     wp_enqueue_script( 'backbone_localstorage' );     wp_enqueue_script( 'bb_one' ); } add_action( 'wp_enqueue_scripts', 'av_one_load_scripts' ); 

this question revolved around outdated local storage script, i'm following example still getting error. ideas?


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -