Web Developer | A little something about everything...

Web Developer

A little something about everything...

lightweight Javascript toggle function without jquery to display block/none for an element

Here is a quick lightweight javascript toggle function for sites where you dont want to use jquery.

The JavaScript:

<script>
function toggle(id) {
var e = document.getElementById(id);
if(e.style.display == 'block')
e.style.display = 'none';
else
var list = document.getElementsByClassName("tmc");
for (var i = 0; i < list.length; i++) {
list[i].style.display="none";
e.style.display = 'block';
}
}
</script>

Some example CSS:

<style>
.dbn {
display:block;
float:right;
width:40vw;
border:.05em solid #000;
padding:.8em;
margin:1em;
box-shadow:0 0 .3em #000;
}
#aa {background-color:#f00;}
#bb {background-color:#0f0;}
#cc {background-color:#00f;}
</style>

Some excmple HTML:

<ul>
<li><a onclick="toggle('aa');" style="cursor:pointer ">one</a></li>
<li><a onclick="toggle('bb');" style="cursor:pointer ">two</a></li>
<li><a onclick="toggle('cc');" style="cursor:pointer ">three</a></li>
</ul>
<div id="aa" class="dbn">
Content of Div aa
</div>
<div id="bb" class="dbn">
Content of Div bb
</div>
<div id="cc" class="dbn">
Content of Div cc
</div>

Example:

Content of Div aa
Content of Div bb
Content of Div cc

Launch of new International Tax Law Firm Website: Moskowitz LLP 2016

Today is the launch of new site for Moskowitz LLP. The new design uses reactive design concepts, not to be confused with adaptive design which generally folds up on itself as you re-size the screen or switch devices.

Moskowitz LLP is an international tax law firm located in the financial district of San Francisco, California. Steve Moskowitz is the Senior Partner and Lead tax Attorney at the firm. The full team at Moskowitz LLP has impressive experience in tax law and related services. If you are looking for a tax law firm with experience and motivation give them a call at 888 829-3325.


Site information:

Code: HTML5, CSS3, JS, ASP.Net, Perl

Website: http://moskowitzllp.com

The desktop layout:


Here is the same site on mobile:


If you're looking for a new site design or marketing for your law firm or business, give me a call to discuss your next project: 507 358-4242