HTML and CSS Reference
In-Depth Information
if(value.length > 0){
_self.search(value);
}
});
_searchfield.addEventListener('input', function(){
/**
* This is the value of the input field
*/
var value = this.value;
/**
* This will clear the search timeout
*/
clearTimeout(_searchTimeout);
/**
* You don't want to run search straight after every key press.
* This will set a timeout of 1 second (1000 ms) before the
* search function is called.
*/
if(value.length > 0){
document.getElementById('taskbar').classList.add('searchactive');
} else {
document.getElementById('taskbar').classList.remove('searchactive');
}
_searchTimeout = setTimeout(function(){
_self.search(value);
}, 1000);
});
}
Performing a Search
The search action will be used to perform a JSONP request to Rotten Tomatoes,
based on a search value.
var app = app || {};
app.controller = app.controller || {};
app.controller.movies = function(){
 
Search WWH ::




Custom Search