Subversion Repositories SmartDukaan

Rev

Rev 18244 | Rev 18436 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18244 Rev 18370
Line 1... Line 1...
1
<!-- template for deals tab -->
1
<!-- template for deals tab -->
2
 
2
 
3
<script>
3
<script>
4
  $(document).ready(function(){
4
  $(document).ready(function(){
5
    $('.uvideo').click(function(){
5
    $('.uvideo').click(function(){
-
 
6
    window.history.pushState('forward', null, './forward');
6
      var source= $(this).data('source');
7
      var source= $(this).data('source');
7
      // alert(source);
8
      // alert(source);
8
      $('#content-add').empty();
9
      $('#content-add').empty();
9
      var content = "<iframe width='100%' height='100%' src='http://www.youtube.com/embed/"+source+"?autoplay=1'></iframe>"
10
      var content = "<iframe width='100%' height='100%' src='http://www.youtube.com/embed/"+source+"?autoplay=1'></iframe>"
10
      $('#content-add').append(content);
11
      $('#content-add').append(content);
11
      var producttitle = $(this).closest(".productdetails").find(".producttitle").html().trim();
12
      var producttitle = $(this).closest(".productdetails").find(".producttitle").html().trim();
12
      ga('send', 'event', 'Video Link Clicked', producttitle, me);
13
      ga('send', 'event', 'Video Link Clicked', producttitle, me);
13
      $('#videoModal').modal('show');
14
      $('#videoModal').modal('show');
14
    });
15
    });
15
    
16
    
-
 
17
    if (window.history && window.history.pushState) {
-
 
18
 
-
 
19
        $(window).on('popstate', function() {
-
 
20
             $('#videoModal').modal('hide');
-
 
21
      		 $('.text-center').empty();
-
 
22
        });
-
 
23
 
-
 
24
      }
-
 
25
    
16
    $('.close').click(function(){
26
    $('.close').click(function(){
17
      $('#videoModal').modal('hide');
27
      $('#videoModal').modal('hide');
18
      $('.text-center').empty();
28
      $('.text-center').empty();
19
    });
29
    });
20
 
30
 
21
    $('#videoModal').click(function(){
31
    $('#videoModal').click(function(){
22
      $('#content-add').empty();
32
      $('#content-add').empty();
-
 
33
      window.history.back();
23
      // $('.text-center').append('<img src="/img/ajax-loader.gif"/>');
34
      // $('.text-center').append('<img src="/img/ajax-loader.gif"/>');
24
    });
35
    });
25
 
36
 
26
    $('.img-overlay a').click(function(){
37
    $('.img-overlay a').click(function(){
27
       $('#loadingModal').modal('show');
38
       $('#loadingModal').modal('show');