inames = ['aapl', 'csco', 'ibm', 'amzn']
data = {name: quandl.get('WIKI/'+ name + '.11', start_date=start, end_date=end) for name in inames}
Ага, через событие onorientationchange
и свойство window.orientation
.
Вы можете проверить ширину тела документа. Если он вдруг станет меньше или больше, вы знаете, что произошло. Вы можете измерить его с интервалом.
window.setInterval(function() {
// check body with here and compare with global variable that holds the last measurement
// you may set a boolean isLandscape = true if the body with became bigger.
}, 50);