jquery - Change Twitter widget height with Javascript? -


i'm trying alter height of twitter widget (feed embed) height in @ breakpoints in order conform responsiveness of site. here's have:

$(document).ready(function() {     function twitterresize() {         if($('#twitter-widget-0').length()) {             $('#twitter-widget-0').each(function() {                 if(jquery(window).width() < 768) {                     $(this).height(400);                 }                 if(jquery(window).width() >= 768 && jquery(window).width() < 1200) {                     $(this).height(497);                 }                 if(jquery(window).width() >= 1200) {                     $(this).height(516);                 }             });         }     };     twitterresize();     $(window).resize(twitterresize); }); 

this preventing widget loading @ all. have tried changing height="" html attribute via js prevented loading well. need i'm trying not resort api, take me while.

i appreciate if has solution i'm stuck. if need more info, let me know. in advance,

oli.

edit: should have said, want take effect when user changes width of browser, rather on page load.


Comments

Popular posts from this blog

What Are The Best Universities In The World?

Hard vs. Soft Water: What's The Difference?

java - Solr query version issue: Invalid version or the data in not in 'javabin' format -