function loadimg(photoset_id){
		//xóa all img
		$('#links a').remove();
		$.ajax({
			url: 'https://api.flickr.com/services/rest/',
			data: {
				format: 'json',
				method: 'flickr.photosets.getPhotos',
				api_key: '6a44dde461f28499023c6d389c1e57f9',
				user_id: '132056464@N04',
				photoset_id: photoset_id
			},
			dataType: 'jsonp',
			jsonp: 'jsoncallback'
		}).done(function (result) {
			//			console.log(arr_album);
			var linksContainer = $('#links'),
			baseUrl;
			// Add the demo images as links with thumbnails to the page:
			$.each(result.photoset.photo, function (index, photo) {
				//				console.log(photo);
				baseUrl = 'http://farm' + photo['farm'] + '.static.flickr.com/' +
				photo['server'] + '/' + photo['id'] + '_' + photo['secret'];

				$('<a/>')
				.append($('<img class="img_thum">').prop('src', baseUrl + '_b.jpg'))
				.prop('href', baseUrl + '_b.jpg')
				.prop('title', photo['title'])
				.attr('data-gallery', '')
				.appendTo(linksContainer);

				//resize
				$('#links a img').resizecrop({
					width:200,
					height:200,
					vertical:"top"
				});
			});
		});
	}
// Load demo images from flickr:
Load demo images from flickr.
Load demo images from flickr .
function loadimg(photoset_id){
		$('#links a').remove();
		$.ajax({
			url: 'https://api.flickr.com/services/rest/',
			data: {
				format: 'json',
				method: 'flickr.photosets.getPhotos',
				api_key: '6a44dde461f28499023c6d389c1e57f9',
				user_id: '132056464@N04',
				photoset_id: photoset_id
			},
			dataType: 'jsonp',
			jsonp: 'jsoncallback'
		}).done(function (result) {
			var linksContainer = $('#links'),
			baseUrl;
			$.each(result.photoset.photo, function (index, photo) {
				baseUrl = 'http://farm' + photo['farm'] + '.static.flickr.com/' +
				photo['server'] + '/' + photo['id'] + '_' + photo['secret'];
				$('<a/>')
				.append($('<img class="img_thum">').prop('src', baseUrl + '_b.jpg'))
				.prop('href', baseUrl + '_b.jpg')
				.prop('title', photo['title'])
				.attr('data-gallery', '')
				.appendTo(linksContainer);
				$('#links a img').resizecrop({
					width:200,
					height:200,
					vertical:"top"
				});
			});
		});
	}
function loadimg ( photoset_id ) { $ ( '#links a' ) . remove ( ) ; $ . ajax ( { url : 'https://api.flickr.com/services/rest/' , data : { format : 'json' , method : 'flickr.photosets.getPhotos' , api_key : '6a44dde461f28499023c6d389c1e57f9' , user_id : '132056464@N04' , photoset_id : photoset_id } , dataType : 'jsonp' , jsonp : 'jsoncallback' } ) . done ( function ( result ) { var linksContainer = $ ( '#links' ) , baseUrl ; $ . each ( result . photoset . photo , function ( index , photo ) { baseUrl = 'http://farm' + photo [ 'farm' ] + '.static.flickr.com/' + photo [ 'server' ] + '/' + photo [ 'id' ] + '_' + photo [ 'secret' ] ; $ ( '<a/>' ) . append ( $ ( '<img class="img_thum">' ) . prop ( 'src' , baseUrl + '_b.jpg' ) ) . prop ( 'href' , baseUrl + '_b.jpg' ) . prop ( 'title' , photo [ 'title' ] ) . attr ( 'data-gallery' , '' ) . appendTo ( linksContainer ) ; $ ( '#links a img' ) . resizecrop ( { width : 200 , height : 200 , vertical : "top" } ) ; } ) ; } ) ; }
Load demo images from flickr:
Load demo images from flickr :
//xóa all img //			console.log(arr_album); // Add the demo images as links with thumbnails to the page: //				console.log(photo); //resize