HTML and CSS Reference
In-Depth Information
* If a match is found, set the
* favorite flag to true
*/
movie.setFavorite(true);
}
}
/**
* Add actors to the movie
*/
for(var i = 0; i < rtresult.abridged_cast.length; i++){
var cast = rtresult.abridged_cast[i],
character = (typeof cast.characters === 'undefined') ? '' :
cast.characters[0];
var actor = new app.model.actor(cast.name, character);
movie.addActor(actor);
}
// Create the movie view
var view = new app.view.movie(movie);
viewcard.innerHTML = view.render().innerHTML;
// Intialize iScroll
_viewScrolls.push(new iScroll(viewcard.querySelector('.movie-content'),
{vScroll: false, vScrollbar: false}));
[].forEach.call(viewcard.getElementsByClassName('block'), function(el){
_viewScrolls.push(new iScroll(el, {hScroll: false, hScrollbar:
false}));
});
/**
* Add an event listener to the window. If it resizes,
* reset the iScroll so that it adjusts to the new size.
*/
window.addEventListener('resize', function(){
setTimeout(function(){
_searchScroll.refresh();
for(var i = 0; i < _scrolls.length; i++){
_viewScrolls[i].refresh();
}
}, 100);
});
Search WWH ::




Custom Search