Advertisement
dmontal2

jquery_click_ajax

May 11th, 2014
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.72 KB | None | 0 0
  1.  //SELECT XYZ INSTANCE
  2.  $(document).on('click', '.ins-sel', function(){
  3.  
  4. //$(this).find('.ins-sel').text();
  5. var ins_vendor = $(this).closest('.os-container').children('.os-v').text();
  6.  
  7. //var get_vendor = $(this).closest('.os-container').children('.this_vendor').text(ins_vendor);
  8.  
  9. //RETRIEVE PRICING SHITE
  10.  
  11.  
  12. $.ajax({
  13.   type: 'POST',
  14.   url: inv_cloud_price_uri,
  15.   //url: inv_cloud_details_uri,
  16.   data: { vendor : ins_vendor },
  17.   success:function(data){
  18.    
  19.   var flavors = $.parseJSON(data);
  20.  
  21.  //FOREACH LOOP
  22.  $(flavors.response).each(function(i,el) {
  23.  
  24.  $(this).closest('.os-container').children('.prices').append(el.pprice);
  25.  //$('.prices').append(el.pprice);
  26.  
  27.   });
  28.  
  29.  }
  30.  
  31.  
  32.  
  33.  
  34.  });
  35.  
  36.  });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement