issue with < a href onclick logical to change another div on the page

I have a div in a < a href delivering a javascript onclick function that makes changes to the other two div on the page.  It follows a "learn more... less... show kind of logic where when the page loads the div called lowerContent appears and the text of div href is show less...»  When they click on this div, a lowerContent div is hiddern and the text of the button is changed to learn more...

As a newbie to CSS, I have every piece working on his own great works, but when I put all together, it doesn't work.  Loading the page with the lower div displayed and the text to show less...  When you click on one < a href, it works, the lower div is hidden, and the text is changed to learn more...  But, when click on a time (or any number of times) the lower div does not appear (although all other cahnges are working properly.

I reduced the code for the below which is a minimum and I hope that some experts CSS can help me?

Thank you very much

Jay

<! doctype html >

< html >

< head >

< meta charset = "utf-8" >

dffsdf < title > Document < /title >

< style type = "text/css" >

{#myContent}

height: 380px;

Width: 400 PX;

margin-right: auto;

left margin: auto;

border: 2px solid #5F2A2A;

do-size: 18px;

}

{#myButton}

background-color: red;

float: right;

height: 28px;

Width: 122px;

right margin: 15px;

top of the margin: 15px

left margin: auto;

border: 0px solid # 38 931;

}

: hover {#myButton}

background-color: gray;

float: right;

height: 28px;

Width: 122px;

right margin: 15px;

top of the margin: 15px

left margin: auto;

border: 0px solid # 38 931;

}

{#lowerContent}

display: auto;

height: 100px;

Width: 300px;

margin-right: auto;

top of the margin: auto;

left margin: auto;

border: 2px solid # 38 931;

}

< / style >

< script type = "text/javascript" >

function changeDisplay() {}

var s = document.getElementById("myButton").innerHTML;

If (s == "learn more...) ») {}

document.getElementById("myButton").innerHTML = "Show less..." » ;

document.getElementById("myContent").style.height = "480px";

document.getElementById("lowerContent").style.height = "190px;

document.getElementById("lowerContent").hidden = "true";

} else {//s will match show less...}

document.getElementById("myButton").innerHTML = "learn more...". » ;

document.getElementById("myContent").style.height = '380px ';

document.getElementById("lowerContent").style.height = '100px ';

document.getElementById("lowerContent").hidden = "false";

}

}

< /script >

< / head >

< body >

< div id = "myContent" >

< ul >

< li > This is line a < /li >

< li > This is line two < /li >

< li > it's third line < /li >

< li > it's four line < an id = "myHref" href = "#" onclick = "changeDisplay (); ">

< div id = "myButton" > view less... < / div >

< /a >

< /li >

< /ul >

< div id = "lowerContent" > content line a lower < / div >

< / div >

< / body >

< / html >

My sample works.  Try to use the code in my JSFiddle example above.

Nancy O.

Tags: Dreamweaver

Similar Questions

  • When answer us e-mail, punctuation change another channel of the alphabet, when the other person receives the message.

    When answer us e-mail, punctuation change another channel of the alphabet, when the other person receives the message.

    When they reply to the message, foreign brands are repeated to us. I find no access in the program to fix this problem.

    original title: problem with punctuation

    Guessing that you use Windows Live Mail 2011, take a look at this page: Why do I see strange characters in messages? It can explain your situation and offer solutions.

    Noel

  • With the help of Windows to the top. -J' changed my settings on the page to backup several times, and now when I try to back up my computer it keeps default.

    TODAY, I CHANGED MY SETTINGS ON THE BACKUP OF THE PAGE WITH THE HELP OF WINDOWS BACK UP TO SEVERAL TIMES AND NOW WHEN I TRY TO BACK UP MY COMPUTER AGAIN, HE GUARD DEFAULT.
    I HAVE WINDOWS VISTA PREMIUM 64 BIT.
    I WOULD APPRECIATE YOUR RESPONSE

    Hello

    1. do you receive any error messages?
    2. what exactly happens when you try to backup data?
    3 have. what settings you changed?

    Please answer these questions. This will help us assist you better.

    Try to perform the clean boot.

    Refer; http://support.Microsoft.com/kb/929135

    Thanks and greetings
    Umesh P - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.
    [If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message.] [Marking a post as answer, or relatively useful, you help others find the answer more quickly.]

  • Image change main header when the page is reloaded?

    Anyone know how to make the main site change my header image whenever the page is refreshed? I really don't want to make this header when back you a slide show of images, just a new image of image here or refresh the page.

    Thank you!

    The only way that muse may call a new image when updating is integrated in a slideshow widget.

  • Change the content of a region according to another part of the Page even?

    Hi guys,.

    I have an application where I wish I had two regions on a page with the content of the 2nd region depend on the selection (via a link perhaps?) in the 1st region. The real app is showing colleges undergraduate of the applicant for attendance in the first region and then by displaying the coursework taken at the "institution" in region 2. Is this possible on a single page with the 2nd area of repopulation without a refresh of the page in its entirety?

    Thanks in advance.

    Phil

    Hi Phil,

    I have just set up a quick page to show what I think you're after. I would like to know if it's the kind of thing you want to say: [http://apex.oracle.com/pls/otn/f?p=56976:3] - click on any of the values of DEPTNO to see a list of employees in this Department are displayed on the right.

    Andy

  • Table with list of value to load on another value of the column that is never changed by the user

    Nice day!

    I work with JDeveloper 11.1.2.4.

    I have a Table of the ADF that has 4 lines.  Each row has a column with a unique value.  The plan should include a LOV column in the row show a different list of values based on a single column value.  I have install the list of values, use a display with a variable binding criterion.  When you create the data LOV source, I Specifies the name of a single column for the value of the bind variable.  However, it seems that the LOV changes none selecting different lines.

    Is there a good way to handle this?  I did LOVs of person in charge in the past, but this isn't quite the same as the user can view only the value that depends on the LOV on.

    Any suggestions are greatly appreciated!


    BradW

    Hey, it's always a case of use of the dependent list of values. If the attribute that you bind the bind variable view criteria at part of the view object then the value LOV to be examined accordingly. I did a quick test case and I see my lists filtered by an attribute in line (I used the HR schema and posted employees as candidates managerId. The employee list is filtered so that it only shows the employees in the same Department that the employee I want to put a new managerId on) Frank

  • Change of color of the page in a tab control programmatically

    AFAIK, you can manually change the colors of the individual pages in a tab control (if you have the property allow several colors set to True), but you can't do it programmatically.

    For my particular application, there is only a single page color, I need to change, so I can get the effect by setting the colors I want manually and activating / deactivating allow multiple colors on the control tab as needed, but I wonder if there is a better solution out there.

    Thank you

    Kyle

    Of course, you can:

    Not sure if you try to change the background or foreground color.

  • automate the changing images while retaining the page layout

    First of all I'm a complete noob to InDesign I have to load several pictures on a model separately (product shots if its just a pic at a time) after googling ID, I realized sizing questions has been the best program to keep all the images the same size in a framework is possible to automate the process of loading the images instead of me having to do it manually one by one?

    If your model has graphic empty placeholder frames for your photos, you can select several photos at once in the Place dialog box (file > Place). Then you will get thumbnails for each of them in your cursor placement, and you can move your cursor over each placeholder image, click to place, move to the next, click, etc.

    When you have a cursor with several images loaded, it will display a number (the number of remaining pictures). You can browse the images in your cursor with the arrow keys (left arrow, right arrow).

  • Typekit Web fonts change size temporarily when the Page refreshes

    Hello

    I use Typekit, Source without Pro fonts on my site.  The police appear in good condition, but when any page refresh or if you go to a new page on the site, all instances of the police appear more than a second and then return to normal.  Would you have any idea why this happens?

    Here's the site (excuse the pixelated image):

    Interiors of MK

    Thank you!

    You can try this help page: Adobe Typekit Help: Flash control without text style (... )

    I'm guessing that you see a Flash of unstyled text, not just a change of size. I could be wrong, but it's worth the trip.

  • Lexmark X 5650 works very well with Windows 7 Home-64, now, color and size of the pages does not work. The ink is OK. Can't find the solution anywhere! I tried Mr. Fixit... Nothing helps

    Have Windows 7 home - 64. Been using Lexmark X 5650 printer successfully several times. Now only print black and white photos.  Also a part of any page I want to copy will be printed, only in B & W.  Sizes does not correctly... and a lot of ink color & black.  Tried all the suggestion of Mr. Fixit, nothing helps.  Help please!

    Did you upgrade or install something before this product?

    How Lexmark support/help/FAQ to say?

  • Stay on the Page/move with text/pull on my hair

    Dear friends,

    I asked this question before and yet I'm still terrible problems with my graphics flies over the text document when I add more text.  I'm not able to find the archives with the answers that people have written to me.

    I need to write a series of laboratory reports and using a terrible time amount to try to put the images in place. I do not receive a flow of text running.  Even in sections that I created, some of the images floated back up to the top of the section and are sitting there tight.  I am not able to move.

    Here is an example of a problem: I inserted a scatterplot and written my text.  I click on the tab "move with the text."  The Text wrap tab chooses spontaneously "Inline with the text.  My plot is moved to the left column - but I don't want that here.  I need to add a small annotation.  I'm not able to merge the plot toward the Center where the function of "In line with text" does not allow this.

    Basically, I try and change all the figures and plots to "Move with the text", but they tend to change to 'Stay on the Page' when I look away.

    Now, I wonder if I shouldn't open a new document in layout? This way I can add all my numbers for the section of the results in place holders.  But what I can combine "Text Layout" sections "Page Layout"?

    I really want to go back to Microsoft Word.  I would like to become proficient with Pages - and of course to learn my lab equipment!

    5.6.2 pages

    OS X El Capitan

    MacBook Air

    Thank you for your attention.

    Jonelle

    Today, I opened my document to

    Jonelle,

    Each object, with the exception of a table when it is inserted in a document of v5.6.2 Pages, has its object set to Move with text placement and its set to automatic text wrapping. To keep your images of richocheting around your document out of your control, or push a the other, visit the reorganize with the selected image tab and change skin to zero. Now you can place pictures anywhere in your body text.

    Unlike Word, Pages v5.6.2 doesn't have a convenient annotation tool, and we need to position and an oblong text box that contains the annotation group - under the image.

  • The file names changed in wingdings, including the file extension and I can't delete, change them, open, etc. Here are the pictures.

    Have (had) a file with multiple files it contains with pictures in each file.  A week ago the pictures were there.  Now, the names are replaced by wingdings as names and file extensions.  When I try to open it, it is not accessible and that the file name, directory name or volume label syntax is incorrect.  When I try to delete it, it says that the file name you specified is invalid or too long and specify a different name.  When I try to rename it, it tells me that if I change the file name extension, the file may become unusable.  If I try to change anyway, it says I've specified file name is not valid or too long.  Only tried for the name 1.  I did a restore in the case where a program interfered with that.  However, nothing has changed.  All of the suggestions.

    You can download and try to delete the file Unlocker http://www.softpedia.com/get/System/System-Miscellaneous/Unlocker.shtmlwilh.  Although it is not designed for this particular circumstance, it may very well work in all cases, as it has been very successful in a wide variety of situations are not specifically highlighted in the directions (where do not work the normal Vista options).  NOTE: Some antivirus flag programs this program as a malware, but it is a 'false positive' and is safe to use perferctly.  My own software to flag, but several other well-known software products it clean and the warning is included in the documentation of the program.

    I wish there was a way to save the images, but at this point, it seems that the only option is to delete because you can't rename files EHF (if this option is available-I hope that work above).  Unfortunately, System Restore does not affect the files of data, so even if a program caused this, System Restore can eliminate the cause, but it would not restore the files to their previous names.

    If you have Vista Business, Vista Ultimate or Vista Enterprise, you can be lucky because they retain the files called snapshots http://windows.microsoft.com/en-AU/windows-vista/Previous-versions-of-files-frequently-asked-questions.  It can be used to recover previous versions of files that have been changed or deleted accidentally.  Here's how: http://www.microsoft.com/windows/windows-vista/features/shadow-copy.aspx.

    If you have Vista Basic or Premium of Vista, you don't have a shadow, but there is a free program for you that does essentially the same thing called Shadow Explorer: http://www.shadowexplorer.com/.  I suggest that you download and implement as soon as POSSIBLE to protect you if you accidentally delete or modify a file.  It will not help you in this instance, but it can help save the next time.

    I'm more concerned about why this has happened in the first place and prevent it from happening again.  I saw file names change before, but never of wingdings which then do not let you open, edit, delete, or rename.  We will check some of your system files: go to start / all programs / accessories / command prompt and right click on command prompt, and then click Run as administrator.

    Type sfc/scannow, go and let it run.  It will scan and try to correct some of your system files.  If all goes well he comes complete with no corruption, it could not repair (if it has these post of corruption here or try to analyze it to find the problem or files using http://support.microsoft.com/kb/928228.  If you find any these corrupted files, try to post them here.  Maybe we can replace the good files on the disc.

    While in the command prompt, type chkdsk /f /r and enter and let it run.  It will scan and try to solve any corruption or bad sectors on your hard drive and remove especially as a cause.

    If this does not work, then please post repetitive errors in Event Viewer about the name change (Start / Control Panel / administrative tools / Event Viewer).  Here's how to use Event Viewer: http://www.bleepingcomputer.com/forums/topic40108.html.

    If this does not work, you will need to do a repair/system upgrade using the Windows Vista Installation disc authentic (you own or that you can borrow from someone).  Here is the procedure: http://www.vistax64.com/tutorials/88236-repair-install-vista.html as well as the upgrade from an earlier version of the Windows section of the following: http://support.microsoft.com/kb/918884.  Although this will not affect your data, settings or programs, you should always back up your data before you start just be on the safe side. If other procedures do not work, it is almost certain to work - but it will probably not fix your renamed files.  You can have a lot of updates to re - install (including all you need to remove service packs).  If the version on system with SP1 or SP2 preinstalled cane and the disc is an earlier version, then you will need to do a slipstream drive as follows: http://www.vistax64.com/tutorials/151606-vista-sp1-slipstream-installation-dvd.html.

    I hope one of these procedures can solve your problem.  If this isn't the case, after return and we will try something else.  Return message anyway so we know how it turns out.

    Good luck!

    Lorien - a - MCSE/MCSA/network + / A +.

  • DW CS6 test server shows only the login screen of my site. Can't do under the hood live wiew. The pages I want to change/modify is visible only when I connect but I do not know how to reolve that.

    I'm trying to edit a CMS site to my needs and "open" pages is not serious, that is to say those that do not require the user to connect to. I can see and I can modify them according to my needs.

    The trickiest part is when I want to change/modify something inside. Then it wont let me. The only thing I see is the "Login" screen I can see the code and I can do what I need, but when I turn on 'Live wiew' is the log in page that greets me


    Tests of servers is correct because I can use it in my localhost

    Connection MySQL works as it should (Test OK)

    I guess that's something that has to do with permissions, but I don't know what.

    A CMS site, the page is usually filled with data that is stored in a database using a scripting language on the server side. Unfortunately, the Design mode only supports a static language like HTML, there is therefore no recovery information from the database.

    The only way out of your situation is to temporarily remove the permission to the user to the page that you are editing so that you do not to log-in each time. The problem is that you may forget to reactivate the authorization.

    What I always do is to open the site in a browser and verify the change in DW refreshing the page in the browser. In this way, you need to log-in once.

  • How to activate the "Change Password" on the page "my account"?

    Hi all

    I log on using "Administrator" on the page "My account", there is no "Change Password" link on the page.
    Can someone tell me what I need to do to activate it?

    Thank you
    Dan.

    With 11g, OBIEE essentially uses the notion of 10g of external authentication.

    By default, this is done by the LDAP WLS (Weblogic) identity store, but it can be done by an another supported authenticator WLS, or OBIS (custom authenticator or LDAP) metadata. As a result, OBIEE has control over user passwords; This is why the steps mentioned in the notes 1102353.1 do not apply to OBIEE 11 g, but only to users internal/repository-defined in OBIEE 10 g.

    So, as for the maintenance of password in OBIEE 10 g when an external authenticator is used, it is in this authentication system external this password is changed, not in OBIEE 11 g. There is no option in OBIEE 11 g to allow users to change passwords.

    There are two alternatives with which you can change your password:
    (1) from the Weblogic/WLST administration console.
    You must give this user in the Weblogic console access or access to browse the hierarchy of involved MBean and other change permissions. Change the password using WLST instance statement here:

    Ideally, the console and WLST approaches are used by administrative accounts to manage other users. But the console and WLST possible to allow other users to change the passwords (which will be more or less as an administrative task by the users themselves)

    (2) with the help of a programmatic approach.
    Here, the application that intends to provide the users with the password change functionality must implement this functionality on its own (GUI more appeal to the relevant Weblogic API). WebLogic provides an MBean that the application can use to achieve this. See here for more information.

    An enhancement request is for this feature. It is unpublished bug 11836170 - allow non-admin users to change passwords in obiee 11 g.

  • Problems with the pages of models CS3

    My site is www.cft-aft.org and I have problems with a page or two that were created from a master template that the images are not loading or projection. An example can be found at http://http :// www.cft-aft.org/Get%20Involved.html. I don't know what the problem is or how to diagnose.  All pages of this website have been created from the master template. I had some file management problems in the past, and I think I have corrected most of them (with the exception of the change of name without spaces). I understand that this could be a problem and if it is my problem with this specific page, I understand.

    I have attached a few screenshots of the presentation of dreamweaver and a screenshot of my side of local and remote sites.

    The main problem with the page get involved is not editable images do not exist. Everything lies in the local root folder of the site/htdocs, on both sides. I noticed that when I do to the top of the page get involved in DW is at the top right of the screen, he reads a long path (shown as an example on the screenshot) and on other pages which load correctly, the path is not the same thing, but they reside in the same folder. I suspect that this is probably my problem, but I'm confused, how it got like that and worse still, how fix without having to completely rebuild the page.  I am a total novice and teach me how to do this using the DWCS3 Missing Manual book, but I can't find a solution in there, so please help if anyone can, with step by step instructions.

    If anyone has any idea how it happened, I'd appreciate comments so I do this again.

    If more information is needed, please let me know.

    Thank you

    Hi, Kelly.

    What keeps you from renaming files with Word spaces? It is a good idea. On ALL of your files. Rename them to the INSIDE of the files Panel.

    You work in a defined site? Yes, you are.

    The page you we directed (with an address disheveled, but easy to fix on the track), shows a large number of links to files on your computer, do not using links to other files in your root directory.

    You must open your template and reapply links to all images. Save the model. Once you have re-applied the links in your template Master.dwt, change > models > update of the Pages... while your model is open (especially if DW does not ask if you want to update the files). Record everything (better yet, don't have other pages opens when you update the pages...).

    Depending on how you created your page "Se Involved.html", it would be preferable for you to set up a new page of the child of your template and copy the changing content of the old page. Name the new page (without spaces in the file name... lol...) and save it. You won't be totally rebuild the page, because a lot of it will flow in your model.

    Commenting on your illustration to pdf, you want the indicator model-based Yellow Page in the upper right of your page based on a model of read model: Master. Pages containing the path to the top there are incorrect. I don't know how this happens, but it could be a problem with moving the files outside the DW (bad idea)... always use the files Panel to move files. You have full access to your computer in this window.

    Beth

Maybe you are looking for

  • Satellite Pro A30 - broken circuit internal

    Hello I this A30 here and was sold as a resource of spare parts for my other laptop. It seems that the only problem with it is the power supply. The cold state (between 5 and 10 ° C), it works long enough for a few seconds or a few minutes at the sta

  • Satellite U400 - 13K PSU45E Windows XP & 4 GB RAM

    Hello! I have a Satellite Pro U400 - 13K (model: PSU45E-00800DGE), with 4 GB of installed RAM (800 MHz). I used to work with Windows Vista Business SP1 32-bit, which was the pre-installed operating system, and I could see all the 4 GB of RAM in the p

  • The X 301 with a new SSD upgrade

    Hello I would like to know what SSD 256Go is compatible wit my X 301. I read about the new PATA Toshiba. Are they compatible? If this is not the case, what brand SSD you suggest me? Thank you.

  • How to find the list of folders of files owned by a specific user in a shared and its drive path

    Hello people, I'm stuck in a situation where I need a list of files & folders belonging to specific user (user is shane and shared path is------Qpmzeul\lis\IM( ) in a shared drive as well as its path. I created a file with the command "dir/s/Q \\Qpmz

  • Approach for the removal of the physical dimension table

    HelloWe have a situation to decommission a physical dimension table (table 1) and we will have new values.The table is a source for a consistent size with 2 facts in the business model.Can you please let me know steps to transform the existing for th