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
Post a Comment