hw7-2

by sunnyhong

HTML

<body>
  <h1>About jQuery's Job</h1>
  <div id="pp">
  
  </div>
</body>

JavaScript

$.ajax({
            type: 'GET',
            url: 'https://jobs.github.com/positions.json',
            data: { search:"jQuery" },
            dataType: 'jsonp',
            success: function (data) {
                $.each(data, function(index, element) {

                var h = $('<h3>');
         				var title = h.text(element.title);
         				var x = $("<ul>").html("<li>"+"location: "+element.location+"</li><li>"+"type: "+element.type+"</li>");    
         				$('#pp').append(title,x);
                    
                });
            }
 });//end $.ajax