toggle div tag javascript

I need a simple script to toggle a div tag on and off on an onclick link event

And please tell me where to place the script.
In a scrip section in the head of the page or at the bottom of the page

I currently have this

<style type="text/css">
        .eAddress {
            height: 60px;
            line-height: 60px;
            text-align: left;
            color: #8898AA;
            font-weight: bold;
            padding-left: 50px;
            width: 100%;
            display: none;
            clear: left;

<div id="divEditAddress" class="eAddress">TEST</div>
<div class="btAddress"><button id="btnAddress">Edit Address</button></div>
Larry Bristersr. DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Julian HansenCommented:
Here is how you do it with one line of inline JavaScript
<div class="btAddress"><button id="btnAddress" onclick="document.getElementById('divEditAddress').style.display = (document.getElementById('divEditAddress').style.display == 'block') ? 'none' : 'block';">Edit Address</button></div> 

Open in new window

Here is how you do it with a plain JavaScript event handler
var targetDiv = document.getElementById('divEditAddress');
document.getElementById('btnAddress').addEventListener('click', function() { = ( == 'block') ? 'none' : 'block';

Open in new window

Here is how you do it with jQuery
$(function() {
	$('#btnAddress').click(function() {

Open in new window

Working sample here

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Miguel OzSenior Software EngineerCommented:
Use jquery toggle at scrip section  bottom of the page:
$('#yourLinkId').on('click', function(){
	var targetDiv = $('#divEditAddress').toggle();;

Open in new window

Larry Bristersr. DeveloperAuthor Commented:
Julian HansenCommented:
You are welcome.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.