Advertisement
w0lfiesmith

Wordpress Flickr AJAX example

Mar 3rd, 2013
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.47 KB | None | 0 0
  1. <script type="text/javascript">
  2. jQuery(document).ready(function($){
  3.     $.ajax({
  4.         url: "http://api.flickr.com/services/feeds/photos_public.gne?jsoncallback=?",
  5.         type:"get",
  6.         dataType:"json",
  7.         data:{
  8.             tags:"<?php $tagslist = get_the_tags();foreach($tagslist as $tag){echo $tag->name.",";}?>",
  9.             tagmode:"any",
  10.             format:"json"
  11.         },
  12.         success:function(data,textStatus){
  13.             console.log(data);
  14.         },
  15.         error:function(message){
  16.             alert(message);
  17.         }
  18.     });
  19. });
  20. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement