How to retrieve flickr images descriptions from jSON data in Jquery -


i'm working on retrieve image titles json data highlited on attachment or here:

http://www.flickr.com/photos/un_photo/27405307493/\" title=\"aerial view of bentiu protection of civilians site, south sudan\">

i need grab text after "title=\".

the data flickr.the issue code doesn't retrieve descriptions.

any please highly appreciated.

// working json data  function getjsondata()  {    // let's retrieve images flicker      var flickrapi ="http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?";      $.getjson( flickrapi, {                  tags: "bentiu",               //images tags space needle                  tagmode: "any",             // images                  format: "json"              //results in json format                  }, successjsonfn);  }    // working json data  function successjsonfn(result)  {    $.each(result.items, function(indx, item){          //create img tag, set src attribute media.m , append class conent                   $('<img>').attr('src', item.media.m).appendto('.img-contents')                    .css({'text-align':'center','margin-right':'15px','background-color':'yellow'});          //find element descrition  		$img_title = item.description.find("title=\'");  		  		//log on screen           console.log(json.stringify($img_title));  		           //get 5 images/items          if(indx === 5){return false;}      });

enter image description here


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -