Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
$('.show_hidden').on('click',function() {
$id = $(this).data('id');
$('#'+$id).show();
});
<a href="javscript:void(0)" data-id="1" class="show_hidden">click</a>
<a href="javscript:void(0)" data-id="2" class="show_hidden">click</a>
<a href="javscript:void(0)" data-id="3" class="show_hidden">click</a>
<div id="1" style="display:none;">
block one
</div>
<div id="2" style="display:none;">
block two
</div>
<div id="3" style="display:none;">
block three
</div>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question