Skip to content

Instantly share code, notes, and snippets.

View DMPR-dev's full-sized avatar
🏠
Working from home

Dmytro Proskurin DMPR-dev

🏠
Working from home
  • Ukraine, Dnipro
View GitHub Profile
@DMPR-dev
DMPR-dev / dynamic_fb_group_embed.js
Created August 2, 2019 08:47
Dynamic facebook group embed (with an ability to go over 500px in width)
/*
A JS function that allows us to have a proper facebook group embed size(100% of container)(and if we need it to go over 500px in width)
Combined from a few solutions:
@link: https://stackoverflow.com/questions/29429296/responsive-width-facebook-page-plugin
@link: https://www.mugo.ca/blog/How-to-make-the-Facebook-Page-Plugin-fully-responsive
*/
function dynamic_fb_size()
{
jQuery(function($){
var container_width = (Number($('.fb-container').width()));