Skip to main content

mint.com javascript dropdown effect


I need to recreate an effect that mint.com has on another website. When you go to the transactions page and click on one of your transactions a tab pops up underneath that says edit details. When you click on that tab a div will drop down exposing more details about the transaction. I don't even know what this kind of effect this is called but I need to know to recreate something like this preferably with jquery.



There are some screenshots of what I'm talking about below.



closed



open


Source: Tips4allCCNA FINAL EXAM

Comments

  1. only thing you would need to do is get the position of the clicked element and display a div bellow it .. of course you need to have something that gets all the extra information and displays it .. so first thing I would do is create a div somewhere on the page and hide it

    <div id="myEditRecordContainer" style="position:absolute; top: 0px; left: 0px; display: none"></div>


    then I would set the click handler

    $('.recordDiv').click(function(e){
    //get the position of the clicked element
    var position = $(e.target).position();

    //set position of the div bellow the current element
    $('div#myEditRecordContainer').css({"top" : position.top() + $(this).height() + "px", "left": position.left()});

    //some kind of method that will get or populate the extra information
    //you can use the $.ajax() to get the html from a web service or something along those lines
    var detailsHtml = GetExtraRecordDetails();
    $("div#myEditRecordContainer").html(detailsHtml);

    //now display the div - we already set the css for the position
    //correctly so it should just display where you wanted it
    $("div#myEditRecordContainer").show();
    });


    and the only thing you would need to do on the "I'm done" button is call

    $("div#myEditRecordContainer").hide();


    after submitting the changes of course :)

    I didn't have a whole lot of time to give maybe a more detailed example but this was just of the top of my head what I would do in this case ..

    I really hope this at least gives you an idea as to what you can do.

    ReplyDelete
  2. Here is a jQuery plugin that does just that: http://www.jankoatwarpspeed.com/post/2009/07/20/Expand-table-rows-with-jQuery-jExpand-plugin.aspx

    ReplyDelete

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?

CCNA 1 Final Exam 2011 latest (hot hot hot)

  Hi! I have been posted content of ccna1 final exam (latest and only question.) I will post the answer and insert image on sunday. If you care, please subscribe your email an become a first person have full test content. Subcribe now  Some question  have not content because this question have images content. So that can you wait for me? SUNDAY 1. A user sees the command prompt: Router(config-if)# . What task can be performed at this mode? Reload the device. Perform basic tests. Configure individual interfaces. Configure individual terminal lines. 2. Refer to the exhibit. Host A attempts to establish a TCP/IP session with host C. During this attempt, a frame was captured with the source MAC address 0050.7320.D632 and the destination MAC address 0030.8517.44C4. The packet inside the captured frame has an IP source address 192.168.7.5, and the destination IP address is 192.168.219.24. At which point in the network was this packet captured? leaving host A leaving ATL leaving...