How to create a div toggle effect using jQuery? - jquery-ui

I want the following requirement. But there is slight change on it.
http://acrisdesign.com/demo/toggle/
Please consider the above link for the example below.
There are two toggle effects on Hover and Click.
My requirement when someone click on the top of the div: it will expand and there should be a "close" button in the div some on mouse over to this image or click the div will closed. When someone mouse hover the link it will expand.
First time click expand when mouse over the link collapse.
There are toggle links "click here". When someone click on the link it will create a space between each other, but my requirement to it display top of the three link "click here".

Try Accordion
Example one
Example 2
Example 3

Something that I have found very useful is the .toggleClass() function in jQueryUI
http://jqueryui.com/demos/toggleClass/

Related

Suggestions dropdown for Vaadin TextField

How can we add like say google email search, a down arrow icon or even just the function of the down arrow to the Text Field?
The issue is in this component is, It shows suggestion when I start typing. I need to show all suggestions on focus or a down arrow, when I click down arrow it will show all the suggestions. Any help would be appreciated.

How to have a list of options when clicking a TButton on Firemonkey?

I know that TButton on firemonkey let me add a TPopUp Menu. But it only works when you right click it.
I need make it open right below the button when you do the normal click.
PopupMenu.PopUp(X, Y) is based on the form I believe. How to translate the X,Y of the button (that is deep inside other layouts) to the same coordinate?
And when clicking and the PopUp is shown some weird behavior happens with the selection bar of the popup menu that disappear. The button keeps pressed, that is good.
Look here:
http://blogs.embarcadero.com/sarinadupont/2013/10/17/463/
Is an example for mobile, but you use in desktop too.

How do you use the showhide effect found in the Dart Widget Package

I am trying to use the ShowHide effect that comes with Kevin Moore's widget package here:
http://dart-lang.github.io/widget.dart/#showhide
Not sure how to use this. Anyone got an example I can look at ?
Basically all I want is for a dropdown to show with one of those effects if a certain event happens.
Your tips appreciated.
Thanks.
You need to add a listener for an event to an element in the DOM, and then use ShowHide.toggle(element, effect) to trigger an effect. Here is an example which listens for a click on a button, and toggles FadeEffect on an image each time it is pressed:
var button = query("#fadeButton")
..onClick.listen((event) {
ShowHide.toggle(query("#fadeImage"), effect: new FadeEffect());
});
If you wanted to fade in/out a dropdown when you click on a menu bar, then substitute "fadeButton" for the menu which listens for clicks, and "fadeImage" with the dropdown element.
Also, any other effect can be substituted for FadeEffect, such as DoorEffect, ScaleEffect, ShrinkEffect, etc.

Making a table row a link with specific CSS class

I'm currently using a script for a popup window, where when you hit the link, a nice graphic popup window will appear. My problem is, that in it's current form it's a text link, which are working fine. But I want the entire row, that being the row the link is in, to be pushable, and open the popup window, instead of just the link.
Some will say I should use an onlick command of some sort, but my problem is, that my current link is defined as:
Link
And I have no idea how to add the rel and class to an onclick command for the row fx.
So is there some smart way to do this?
you can use this trick to make a whole cell a link
simply, add the text you want to link it in a <div> and set both width and height 100%
HTML:
<td><div>link</div></td>
CSS:
td>a>div {width:100%; height:100%}
you can see an example at JSfiddle (the second row):
http://jsfiddle.net/w8W4L/

Animate only a part of an element

how can I animate only a part of an element?
I show/hide a div using jquery-ui's show method but I'd like to start/end the animation from/to a given height of the element.
My dev website can be seen here (link removed). When clicking on the 'Contact' button the contact page shows up or hides if it's already open. Since I couldn't find how to starts my animation from a given height I added a fixed button when it's closed, but when the contact button of the contact page overlaps the fixed button when it's closing...
Any help welcome!
looking for something like this??
http://jsfiddle.net/rlemon/F6Efp/8/
You can also add any fade or whatever effects. This is using a single button to animate both open and close. You could also attach a attribute to the button tag to define it's current state.

Resources