简体   繁体   中英

How hide “timeline” from Facebook page plugin on responsive desing?

I'm using "@media only" on my css file to get two diferent styles.

In my desktop vercion I have the Fecebook page plugin showing the "timeline" of the page, but I want to hide the "timeline" when "@media only" condition load the style of mobile vercion.

There is a way to manipulate the "timeline" atribute with jquery?

Timeline atribute in html...

According to the Facebook terms, you are not allowed to hide elements of a Social Plugin. But you can do the following:

  • Listen to the resize event with JavaScript
  • If the window size changes, change the attribute of the Page Plugin with JavaScript
  • Use FB.XFBML.parse('page-plugin-id') to parse the Plugin again, with the new attributes

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM