I downloaded the typewatch file from the github page, put it in my vendor/assets/javascripts file and required it the normal way in my application.js Then I do the following code (as shown on the github page)
$(function () {
var options = {
callback: function(){ alert("changed search text"); },
wait: 50,
highlight: true,
captureLength: 2
}
$('#search').typeWatch( options );
});
and it doesn’t work at all. It also breaks the backstretch functionality I have. Any help would be greatly appreciated, this is getting pretty irritating 🙁
Update:
Firebug gives the following error: “elem.type is undefined” in line 38 of the plugin code
as you reported
<form id="search" method="get" action="/concerts" accept-charset="UTF-8">is shown atconsolein comments. which means its searching for atypeattribute of the dom. and you are passing theformdom to it. rather you should pass theinputfield. like$('#search_input_field').typeWatch(options);