Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 13th, 2012  |  syntax: None  |  size: 3.41 KB  |  hits: 11  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. jQuery - *variable* is not defined
  2. $('.share_button').live('click', function(e){
  3.     $('#player').fadeOut('slow');
  4.     var share_id = $(this).attr('id');
  5.  
  6.     $.ajax({
  7.         type: 'GET',
  8.         url: '/youtube.php',
  9.         data: 'share='+ share_id,
  10.         success: function(data) {
  11.             //$('#params').html(data);
  12.             //params = $('#params').html();
  13.             param = data.split('--');
  14.             share_title = param[0];
  15.             share_description = param[1];
  16.             share_picture = param[2];
  17.             share_views = param[3];
  18.         }
  19.     });
  20.     e.preventDefault();
  21.     FB.ui(
  22.     {      
  23.         method: 'feed',
  24.         name: share_title,
  25.         link: 'http://www.facebook.com',
  26.         picture: share_picture,
  27.         caption: share_views,
  28.         description: share_description
  29.     },
  30.     function(response) {
  31.         $('#player').show('slow');    
  32.     });
  33. });
  34.        
  35. $('.share_button').live('click', function(e) {
  36.     $('#player').fadeOut('slow');
  37.     var share_id = $(this).attr('id');
  38.  
  39.     $.ajax({
  40.         type: 'GET',
  41.         url: '/youtube.php',
  42.         data: 'share=' + share_id,
  43.         success: function(data) {
  44.             //$('#params').html(data);
  45.             //params = $('#params').html();
  46.             param = data.split('--');
  47.             share_title = param[0];
  48.             share_description = param[1];
  49.             share_picture = param[2];
  50.             share_views = param[3];
  51.  
  52.             FB.ui({
  53.                 method: 'feed',
  54.                 name: share_title,
  55.                 link: 'http://www.facebook.com',
  56.                 picture: share_picture,
  57.                 caption: share_views,
  58.                 description: share_description
  59.             }, function(response) {
  60.                 $('#player').show('slow');
  61.             });
  62.         }
  63.     });
  64.     e.preventDefault();
  65. });
  66.        
  67. $('.share_button').live('click', function(e) {
  68.     $('#player').fadeOut('slow');
  69.     var share_id = $(this).attr('id');
  70.     var share_title;
  71.     var share_... // do all your other share_*'s here as well.
  72.  
  73.     $.ajax({
  74.         type: 'GET',
  75.         url: '/youtube.php',
  76.         data: 'share=' + share_id,
  77.         success: function(data) {
  78.             //$('#params').html(data);
  79.             //params = $('#params').html();
  80.             param = data.split('--');
  81.             share_title = param[0];
  82.             share_description = param[1];
  83.             share_picture = param[2];
  84.             share_views = param[3];
  85.  
  86.             FB.ui({
  87.                 method: 'feed',
  88.                 name: share_title,
  89.                 link: 'http://www.facebook.com',
  90.                 picture: share_picture,
  91.                 caption: share_views,
  92.                 description: share_description
  93.             }, function(response) {
  94.                 $('#player').show('slow');
  95.             });
  96.         }
  97.     });
  98.     e.preventDefault();
  99. });
  100.        
  101. $.ajax({
  102.     type: 'GET',
  103.     url: '/youtube.php',
  104.     data: 'share='+ share_id,
  105.     success: function(data) {
  106.         param = data.split('--');
  107.         share_title = param[0];
  108.         share_description = param[1];
  109.         share_picture = param[2];
  110.         share_views = param[3];
  111.  
  112.         FB.ui({      
  113.             method: 'feed',
  114.             name: share_title,
  115.             link: 'http://www.facebook.com',
  116.             picture: share_picture,
  117.             caption: share_views,
  118.             description: share_description
  119.         },
  120.         function(response) {
  121.             $('#player').show('slow');    
  122.         });
  123.     }
  124. });