Possible to toggle/animate between 2 sizes using jQuery 2.1.0?

I have a button and a div, just want to change the height of the div between 100px to 200px when click on that button, is it possilbe? I tried to google it but those codes only work on the older version of jquery but not 2.1.0.

hinc94 wrote:
For instance, the original height of the main div is 100px, when  I click the first button, it increases 40px, when I click the second button, it increases 40px again. So if I click all 4 buttons, it increases in total 160px of the div to  260px. If I click on any of the buttons again, it decreases the height of the div by 40px. If I click 4 all it again, it decreases by 160px of the main div. The script above is the changes between 2 fixed heights, but for this there is no fixed height once any of the button being clicked.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Untitled Document</title>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0-rc1/jquery.min.js"></script>
<script>
$(document).ready(function(){
var counter = 0;   
$('.button, .counter').css('cursor' , 'pointer').click(function() {
if (counter > 7) {
counter = 0;
counter++;                                                                                                                                                                                                                 
var height = $("#height").height();
if (counter > 0 && counter < 5) {
height = height + 40;
else if (counter > 4 && counter < 9) {
height = height - 40;
$("#height").animate({ height: height }, 100);
</script>
<style>
body {
    font-family: verdana;
    font-size: 14px;
#height {
    height: 100px;
    background-color:#CCC;
    padding: 15px;
    border-radius: 6px;
    clear: both;
h2 {
    float: left;
    margin: 0 0 12px 15px;
    background-color:#CCC;
    padding: 8px;
    border-radius: 6px;
    color: #fff;
    font-size: 18px;
    font-family: verdana;
    font-weight: normal;
</style>
</head>
<body>
<h2 class="button counter">Button 1</h2><h2 class="button">Button 2</h2><h2 class="button">Button 3</h2><h2 class="button">Button 4</h2>
<div id="height">Resize the box height by clicking the buttons above</div>
</body>
</html>

Similar Messages

  • Toggle between Web Items using an Image link in WAD 7.0

    Hello,
    i want to toggle between Web items using an image link: e.g. on my template I have a visible table and a hidden chart, now when I click on a small chart image I want the table to get hidden and the chart to get visible. I know that this is possible using a button group, but I need to make this possible using an image.
    My approach is the following:
    1. Using a script item with 2 commands of type SET_ITEM_PARAMETERS from the command wizard, from which one command hides the table and one command makes the chart visible.
    2. Writing a hyperlink which calls up the script using the image as source.
    Now my problem:
    This works only if I'm using ONE command of type SET_ITEM_PARAMETERS in the script function. So I can either make the chart visible or hide the table. When I insert a second command in the java script nothing works anymore. However, I need to use both commands at once in order to make it useful. I don't know how to program in javascript, can you help me out?!
    Thanks,
    Norbert
    PS: I could show you the javascript code which was created automatically by the web application designer including both commands, but as I've just seen it in the preview it looks totally messed up since it doesn't get formatted corrected.

    Hi Norbert,
    There is an easier approach. In the button group item, you can insert an image and a description. Just open the parameters of your button there you will find the parameter 'icon'. Insert an image there and leave the 'caption' empty.
    Best regards,
    Janine

  • Is it possible to transfer music between iPhones and iPods with out using iTunes

    Is it possible to transfer music between iPhones and iPods with out using iTunes

    Nope.  Both require iTunes on a computer to sync music from.
    Unless the iPod is an iPod Touch and the music was bought from iTunes.  In which case the Touch can simply go to the iTunes App, under Purchased  and download the purchased songs for free.

  • I would like to be able to size images by kilobytes instead of pixels--is this possible?  I use I-Contact which requires a maximum of 70kb per image.  For best quality I want to make the images as close to 70 as possible.  Currently I choose a size of 300

    I would like to be able to size images by kilobytes instead of pixels--is this possible?  I use I-Contact which requires a maximum of 70kb per image.  For best quality I want to make the images as close to 70 as possible.  Currently I choose a size of 300 pixels on the shortest side but sometimes this gives me an image of slightly greater than 70kb and sometimes the image is just 30-40kb.  Is there a way to be more precise in reaching but not exceeding 70 kb?

    That is not a feature of iPhoto - suggest to Apple - iPhoto Menu ==> provide iPhoto feedback.
    You can opnly resize using the available options and file size is not one of them
    LN

  • It possible to insert lines between 2 other lines in Grid

    Hi
    Is it possible to insert lines between 2 other lines in the Grid. Example, I need to enter a new item between line 1 and 2 in the grid. Similar to inserting lines on the sales documents.
    Can any having any idea please share with me.
    Regards
    Senthil

    Hi,
    have a look at the DataColumns Collection
    A collection of DataColumn objects. Use this collection to add columns to the collection or remove columns from the collection.
    You can access the collection via the DataTable.Columns property.
    you'll find it in the UI API Dokumentation.
    i hope it helps you.
    regards
    David

  • How increase external disk size used for an existing file system, Solaris10

    Configuration:
    Server: Sun T5220
    S/O: Solaris 10 5/08 s10s_u5wos_10 SPARC
    Storage: EMC AX4-5
    EMC PowerPath: PowerPath Version 5.2
    I have the following scenario:
    In AX4-5 storage array, I created two LUNs into RAID Group 10, with Raid Type1/0:
    LUN 101: 20Gb
    LUN 102: 10Gb
    Both LUNs were added to Storage Group (SG1) that includes two Servers (Server1 and Server2); both servers have Operating System Solaris 10 5/8 and Power Path.
    The servers detect both LUNs across two paths. With Power Path were created a virtual path (emcpower0a, emcpower1a) to access to each LUNs respectively.
    We have mounted two file system /home/tes1 over emcpower0a -> LUN101 and /home/tes2 over emcpower1a -> LUN102.
    Filesystem size used avail capacity Mounted on
    /dev/dsk/emcpower0a 20G 919M 19G 5% /home/test1
    /dev/dsk/emcpower1a 10G 9G 1G 90% /home/test2
    I want to increase the space in file system /home/test2, without lost the information that I have stored and using the same LUN, LUN 102. To do this I start with the following steps:
    1-     Create new LUN, LUN 103 with 15Gb into RAID Group 10. Result: OK, I have available space in RAID Group 10.
    2-     Add LUN 103 to LUN 102, using concatenation option. Result: OK. This action creates a new metaLUN with the same characteristics of LUN 102, but with new space of 25Gb.
    After to do these actions, I want to know how Solaris recognize this new space. What I need to do, to increase the size of file system /home/test2 to 25 Gb. Is that possible?
    I reviewed the description of each disk using format command, and the disks not have any change.
    Could anyone help me? If you need more detail, please do not hesitate to contact me.
    Thanks in advance.

    Robert, thank a lot for your know how. You helped me to clarify some doubts. To complete your answer, I will add two more details, based on my experience.
    After to execute, type -> auto configure and label, the disk was created with different partitions like root, swap, usr, like this:
    Volume name = < >
    ascii name = <DGC-RAID10-0223 cyl 49150 alt 2 hd 32 sec 12>
    pcyl = 49152
    ncyl = 49150
    acyl = 2
    nhead = 32
    nsect = 12
    Part Tag Flag Cylinders Size Blocks
    0 root wm 0 - 682 128.06MB (683/0/0) 262272
    1 swap wu 683 - 1365 128.06MB (683/0/0) 262272
    2 backup wu 0 - 49149 9.00GB (49150/0/0) 18873600
    3 unassigned wm 0 0 (0/0/0) 0
    4 unassigned wm 0 0 (0/0/0) 0
    5 unassigned wm 0 0 (0/0/0) 0
    6 usr wm 1366 - 49149 8.75GB (47784/0/0) 18349056
    7 unassigned wm 0 0 (0/0/0) 0
    This was not convenient because all information stored appear in the first slice and growfs not work if appear root or swap slice into the disk, for that reason was necesary to recreate manually every slice with partition command. The final result was this:
    Part Tag Flag Cylinders Size Blocks
    0 unassigned wm 0 - 49149 9.00GB (49150/0/0) 18873600
    1 unassigned wu 0 0 (0/0/0) 0
    2 backup wu 0 - 49149 9.00GB (49150/0/0) 18873600
    3 unassigned wm 0 0 (0/0/0) 0
    4 unassigned wm 0 0 (0/0/0) 0
    5 unassigned wm 0 0 (0/0/0) 0
    6 unassigned wm 0 0 (0/0/0) 0
    7 unassigned wm 0 0 (0/0/0) 0
    Now, execute again the label command to save the new information.
    Mount file system and execute:
    growfs –M file_system mount_point to expand the file system to 9Gb.

  • Is it possible to change the Costing Lot size for preference calculation?

    Hi Gurus,
    Is it possible to change the costing lot size for the preference calculation?
    Reason for my question is: We have all prices on price unit 100
    and we want to use also the price unit 100 for preference calcalation.
    But the preference calculation always take price unit 1.
    Is there any possibility to set somewhere the costing lot size for pref.calculation?
    Thanks
    Regards
    Dieter

    Does really nobody has a hint?

  • Is it possible to delete message in the server using Mail configured using IMAP?

    Is it possible to delete message in the server using Mail configured using IMAP?
    Currently when I delete the message in Mail, the server still keep a copy of it, which means it is not deleted on the server. I know that POP can do this but I still want the option of being able to access it from other computers.
    My server has only a small size, so I hope that I can just delete it from my Mail instead of having to log in to the server and delete it again.
    Thank you.

    yxchng wrote:
    Is it possible to delete message in the server using Mail configured using IMAP?
    Yes, but doing so will remove it from everything else.

  • Traversing between dependent schemas-- using Navigation in OER

    Hi All,
    I would like to know , how to traverse between dependent schemas using NAVIGATION in OER.
    For ex: OrderManagement has a PDF, WSDL,XSD,.doc
    when we search for OrderManagement and would like to see dependent file and traverse between those files .. IS IT POSSIBLE?
    in xml spy we are able to traverse between dependent types of message. Similarly is it possible in OER.
    If non technical person is looking for dependencies.. of OrderManagement Service how they can see that.
    Answer for above queries is appreciated...
    Thanks,

    Post Author: wdaehn
    CA Forum: Data Integration
    I would have used database views as the abstraction layer rather than synonyms. The advantage would be that for views you can see the dependencies, for synonyms not that easy as they are just textual replacements inside Oracle.

  • Can you setup Advanced queueing between 2 databases using SQL*net connection

    Hi experts,
    Is it possible to setup AD between 2 databases without using DBlink? I know we can use Java program to do that. Unfortunately, I have no experience in Java.
    Our version databases is 10g
    Thanks in advance
    Hieu

    Following are the different options available.
    Interfaces to Advanced Queuing
    You can access Advanced Queuing functionality through the following interfaces:
    PL/SQL using DBMS_AQ, DBMS_AQADM,andDBMS_AQELM. Refer to the Oracle9i Supplied PL/SQL Packages and Types Reference.
    Visual Basic using Oracle Objects for OLE. Refer to the Online Help for Oracle Objects for OLE.
    Java using the oracle.AQ Java package. Refer to the Oracle9i Supplied Java Packages Reference.
    Java Message Service (JMS) using the oracle.jms Java package. Refer to the Oracle9i Supplied Java Packages Reference.
    Internet access using HTTP, HTTPS, and SMTP
    For java references you can refer to below URL
    http://docs.oracle.com/cd/B10500_01/appdev.920/a96609/arj_aq.htm#1005399
    I believe no one will provide you fully written code here. You can get help from this forum,

  • Is it possible to sync numbers between iPad and iPhone and mac

    Is it possible to sync Numbers between iPhone and iPad and IMac.  I work in a school and want to keep test scores for my class in the one place without having to manually update the spreadsheets each time I enter scores.
    Thanks in advance
    Conor 

    Yes, Numbers syncs (very well) via iCloud.  You need to activate Numbers iCloud sync on all of your devices.
    On the Mac, go to System Preferences > iCloud and make sure Documents & Data is checked.  Also click the Options... button next to Documents & Data and check Numbers.app.
    On each iOS device, go to Settings > iCloud > Documents & Data > and turn on Numbers. Also go to Settings > Numbers and turn on Use iCloud.
    After you've got things working, it's best to close down the Numbers document on one device before you use it on another.
    SG

  • Is it possible to see decrease of table size & size of tablespace

    Hello
    I wander is it possible to see decrease of table size & size of tablespace(in db02 or in brtools). I have in mind decrease due to archiving in XI.
    Thank you in advance

    Hi,
    Yes it is possible to decrease of table size & inturn size of tablespace.
    You can go for table reorg.
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70c8f19f-8010-2c10-ac89-8d828039d8b4.
    Check SAP Note 541538 - FAQ: Reorganization
    Also
    1.From DB02--> detail analysis menu you can take out top 50 tables & indexes. you can mark the size of the index should be generally less than the table.If its more or very much similar size of table, you can rebuild it using SE14. This can free some space.
    or else you may use brspace to do this.
    http://help.sap.com/saphelp_nw70/helpdata/EN/58/6bec38c9fa7e44b7f2163905863575/frameset.htm
    In case of table this option is risky as it may result in data loss.
    2. Earlywatch alert gives the top 20 degenrated index. you can check that which also gives a factor 'storage quality'.
    3. Run report SAP_DROP_TMPTABLES. It removes temporary database objects. ( we do this in our BW system)
    Hope this helps.
    Thanks,
    Sushil
    Edited by: Sushil Suryawanshi on May 25, 2009 1:30 AM

  • How do I find, at-a-glance, the sample size used in several music files?

    How do I find, at-a-glance, the sample size used in several music files?
    Of all the fields available in a FInder Search, "Sample Size" is not available. Finder does offer a "Bits per Sample" field, but it only recognized graphic files and not music files.
    Running 10.8.5 on an iMac i5.
    I did search through a couple of communities but came up empty.
    Thank you,
    Craig

    C-squared,
    There is no View Option to allow display of a column of sample size. 
    For WAV or Apple Lossless files, it is available on the Summary tab (one song at a time, as you know).  For MP3 and AAC it is not available at all.
    You can roughly infer it from the files that are larger than expected for their time.
    99% of the music we use is at the CD standard of 16-bit, so I can guess that displaying it has never been a priority.  However, if you want to make a suggestion to Apple, use this link:
    http://www.apple.com/feedback/itunesapp.html

  • Amount of temporary tablespace size used for index rebuild

    Hi All,
    I want to know approximate amount of temporary tablespace size used for index rebuild. I need this information to avoid the insufficient temporary tablespace error during the huge index rebuild.
    Is there a query or procedure to find it out.
    Thank you.

    Hi,
    While creating the index, the temporary segment is created in the permanent tablespace. So permanent tablespace must have sufficient space.
    http://www.oracle-base.com/articles/10g/SpaceObjectTransactionManagement10g.php
    http://aprakash.wordpress.com/2010/01/05/numeric-segment-name/
    Anand

  • How to read text and it's font details (Family and size) using Acrobat plugin?

    Hello,
           I have query about reading PDF, I wanted to extract text and it's font details (Family and size) using Acrobat plugin. How can I achieve that?
    Any suggestions are welcome.
    Thanks
    Rohit Shinde

    Look at the samples in the SDK around PDFEdit and the PDEdit APIs.

Maybe you are looking for

  • How do i connect 2 soft synths to 1 midi region?

    I have a bassline made from Massive and Scrabee Bass , i want them to booth run of one midi region like a rack in Ableton . I have them booth running together by going to "Environment - Mixer" and link the channel at the top of the strip . the proble

  • Video iPod frozen after static electricity charge

    Was playing a movie on video iPod connected to TV when I touched the iPod and got a small static shock....the TV screen went white and the iPod is now frozen. Does not respond to connection to iTunes or AC charger; buttons do not work either. Plugged

  • Epson cx 3650 - can't scan

    I have an Epson cx3650 and my driver seems to be missing and I need to scan a document and I'm desperate, epson says that the page is no longer available for download (my luck ) does anyone know where I can get a driver (reliable ) from ? Thank you a

  • Apply a color wash

    Hi everyone, I would like to apply a color wash to a figure in a video clip, as if they were being lit from the front by a colored spotlight. I've been playing around with mask shapes, but not getting the effect that I wanted. Any suggestions? Cheers

  • HT4773 Need a driver for the new wired keyboard on OSX 10.6.7

    I use Snow Leopard 10.6.7 with new wired keyboard. Some keys does not work, ex. volume keys. Any driver, kext or keyboard layout?