You could use the data attributes
and access it by the data()
jquery method.
in your HTML
<h3 data-a='marketing'>marketing</h3>
<h3 data-a='design'>design</h3>
<div class='container'>
<div style='display:none;' class='marketing'>
marketing stuffs
</div>
<div class='design'>
design stuffs
</div>
</div>
and in your javascript
$('h3').click(function(){
type = $(this).data('a');
$('.container div').hide();
$('.container').find('.'+type).show();
})
Here is an exemple fiddle
Also you are calling ready method twice