I'm using jquery / php to access the user's camera and take a picture for a user account. And on the page change user data I need to load the photo show the photo recorded in the database in a "photodb" div and when you click on the take photo button the new image will appear in another div "photo" hiding the div from the photo recorded on the bank. As the code below I can load the page with the photo of the BD but when I click on take picture I deactivate and I do not know how to make appear the div photo that is hidden by default.
<?php
<div class='contentarea'>
<div class='camera'>
<video id='video'>WEBCAM não encontrada!</video>
<button id='startbutton' class='btn-toggle' data-element='#photodb'>Tirar foto</button>
</div>
<canvas id='canvas'> </canvas>
<div id='photobd'>
<img src='gera.php?id=$id' border='1'>
</div>
<div id='photo' class='output' style="display: none">
<img src='' border='1'>
</div>
</div>
?>
I can not use the onclick event because in the jquery function already captures the click and tried to use the event has screwed up what is working. I used a function found here in the forum show / hide div and I can hide the div photodb but I do not know how to make the div appear.
<script>
$(function(){
$(".btn-toggle").click(function(e){
e.preventDefault();
el = $(this).data('element');
$(el).toggle();
});
});
</script>
after this how do I change the display: none of the div photo to appear?