twbs / ratchet

Build mobile apps with simple HTML, CSS, and JavaScript components.

Home Page:http://goratchet.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Uncaught SyntaxError: Failed to execute 'querySelector' on 'Document' Using ratchet js in a apache cordova example

ricardoveramedina opened this issue · comments

Hi all

I'm following this tutorial https://ccoenraets.github.io/cordova-tutorial/hardware-acceleration.html
https://github.com/ccoenraets/cordova-tutorial/tree/master/solutions/directory-solutions/part11

and I would like to use ratchet js "slide-in" instead pageslider js. But when I try to use it I've this error

ratchet.js:37 Uncaught SyntaxError: Failed to execute 'querySelector' on 'Document': '#employees/1' is not a valid selector.

the example use ratchet css and handlebar, this is the html

<script id="employee-list-tpl" type="text/template"> <ul class="table-view"> {{#each this}} <li class="table-view-cell media"> <a href="#employees/{{ id }}"> <img class="media-object pull-left" src="assets/pics/{{pic}}"> <div class="media-body"> {{firstName}} {{lastName}} <p>{{title}}</p> </div> </a> </li> {{/each}} </ul> </script>

this call another template called "employee-tpl"

this is the list of the js (I replaced pageslider with ratchet.js)

<script src="cordova.js"></script> <script src="lib/fastclick.js"></script> <script src="lib/handlebars.js"></script> <script src="lib/jquery.js"></script> <script src="lib/router.js"></script> <script src="lib/ratchet.js"></script> <script src="js/services/memory/EmployeeService.js"></script> <script src="js/EmployeeListView.js"></script> <script src="js/HomeView.js"></script> <script src="js/EmployeeView.js"></script> <script src="js/app.js"></script>

I loved ratchet js and I don't want to use another library :( , thanks :)

what was that?