Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function capture() {
- var photo = document.getElementById('photo'), context = photo.getContext('2d');
- photo.width = video.clientWidth;
- photo.height = video.clientHeight;
- context.drawImage(video, 0, 0, photo.width, photo.height);
- var img = document.createElement('img');
- img.src = canvas.toDataURL('image/png');
- gallery.appendChild(img);
- //window.open(img.src, '_blank');
- โค้ดโหลด lightbox
- $(document).ready(function(){
- $('.bg').animate({
- "opacity":"0.9"
- }, 200, "linear");
- $('div#main-photo').each(function() {
- var $a1 = $(this);
- var src = $a1.find('img').attr('src');
- //$('div.lightbox strong').text(alt).addClass('posi');
- $('.bg , .lightbox').css('display','block');
- $('div.lightbox img').attr('src',src).fadeIn(500);
- });
- $('.close').click(function(){
- close();
- });
- });
- function close(){
- $('.bg , .lightbox').css('display','none');
- }
- -------------------------------------
- onStop();
- gallery.removeChild(img);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement