How to achieve slideToggle effect similar to facebook "New Stories" button with jQuery? - facebook

As you may know not long time ago facebook added several new features. One of them was a "New Stories" button which when clicked expands (with what I guess is a slideToggle effect) and shows new stories.
Here is the button I am talking about:
I would like to know How to achieve same slide / toggle effect and fade in effect that comes in after this button is clicked, with a help of jQuery.
I tried searching for this on internet, but all effects I found were regular slideToggle effects, I mean they started showing div from top and slided down to it's bottom (here is what I mean by regular content http://jsfiddle.net/TwxB4/), where as one facebook uses starts from the bottom of the hidden div and sort of slides to the top of it. (You will see what I mean if you check it on facebook).
Edit: I am only looking for a slideToggle effect and nothing else, I want to be abble to expand and shrink hidden div when user clicks on the link that lunches the effect.
Edit: Here is an illustration of the effect I'm looking for:

This example works the way you described, showing bottom content first:
http://jsfiddle.net/SBLNn/16/
Also full screen view here:
http://jsfiddle.net/SBLNn/16/embedded/result/
They may also do it by having the overflow of the feed hidden, and then setting a negative margin on the inner feed wrapper, then when you click they just animate that negative margin down to 0.

Does this works for you
http://jsfiddle.net/wb7h6/1/
updated version
http://jsfiddle.net/wb7h6/9/ I hope this is what you need

You want slideToggle() I think. See this jsFiddle.

Related

how open a small page in dialog?

I am looking for a solution for display a window over the page like a dialog box but this box will contains a lot of information. It is for my betting game, i display a list of game with a choice between 1 N and 2.
Here is an image of a betting game named netbet :
As you can see i have selected 2.10 in the game Slavia Mozyr/ FC Minsk and a window appears at the bottom of the page for set the amount of money i need to bet. I think it will be better,because mobile screen are very little, displaying a window over the page like a dialog box. Is there a solution for do that in flutter ? Thanks
You might want to use Bottom sheet which does the exact task. It opens a small 'page' (read: widget) over the normal app screen. It'll allow to place the bet etc. It vanishes when use taps anywhere outside.
Sample implementation is here. You can also check solid bottom sheet.

facebook share dialog gets cropped

The problem is that my like button is quite at the bottom at the page,
And when someone clicks the like button, the dialog just gets cropped,
and I just can't do anything with it.
Did anyone have a similar problem?
The only way to fix this is by using some CSS to your page to move the dialog box. This is kind of a hack, but its the only way to really do what you want. The only downside is that the tiny triangle in the top left corner of the dialog will seem out of place.
One other option that does not involve moving the dialog is to make your page slightly longer.

Facebook like button pops up behind some elements

On my website the comment box that pops up when I press the Like button is placed behind some elements of the page and I really don't figure out how to fix it.
For 2 days I'm struggling with z-index property but no result and now I've found a solution by changing the overflow property of the parent div from hidden to visible/auto and it works! BUT I can't use this fix because that div has overflow set to hidden because I'm using the slimScroll plugin to customize the scrollbar...
This is the website, just click on any image and press the Like button to see what happens.
The right and left side of the popup are integrated in a table... I was thinking, if i remove the table and use just divs instead, the fix would be easier?
Thanks!

How to have a popup scrolling in the same way that others elements?

I can not solve my problem. As example, my website : www.mananaseguro.com.
In the home page, I have some popup appearing just under movies's poster (when the mouse is over the poster). But when I scroll UP (for example), the popup will not appear just under the poster. Their is a space between them. I tried to add the popup to the home's page panel but it did not succeed.
So is it possible to simulate the good popup behavior? (the popup must stay under the poster).
Or more precisely, is it possible to attach a DecoratedPopupPanel to another panel inside the page in order to have the popup scrolling in the same way that others elements?
Try using the PopupPanel#showRelativeTo() method.
You can achive good popup behavior by using below property.
popup.setPopupPosition(left, top)
Pass movie image x and y index position in top and left. and make consistent look and fill.

A few questions regarding the Facebook like button on external websites

I am working on a project where I need to manipulate the button in a few ways.
Is it possible to just have the button and not the 'X people like this' text after it?
Does it have to be for one's own page or can it be easily configured, e.g. can I have a button that when clicked likes the fan page for Coca-Cola?
If so, is it possible to get the pop up when you hover over the button, like the pages down the left hand side on https://www.facebook.com/Google
Thanks very much in advance for your help. Please let me know if I have been unclear.
You could try the button_layout layout, which just has the little speech bubble with the number of likers. If you don't like that, you can cut that bubble off by setting the width of the parent container to less than the width of the button.
You can use whatever page URL or web page URL you want.
Hovercards aren't available on fb:like right now, but might be at some point.
More documentation here.