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

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -